What is Typeconf

Typeconf allows you to define and read configuration with types. Using TypeSpec you can define schema for your config and with Typescript you can then set values for this config and generate a JSON file suitable to be read by your service. In the service itself Typeconf generates the same config types that you can use to read the JSON file without errors. With Typeconf you can manage configs as code and easily share them between projects using NPM.

Typeconf is:

  • Open-source

  • Available via npm

  • Can be adopted to existing codebase

  • Ideal for automated flows (like hooks and CI)

Why Typeconf

Typeconf pursues two main goals:

  • Make configs easily shareable between services. Typespec schema allows you to read config between different languages and services. Second advantage is NPM - every configuration directory is just an NPM package which you can easily install and get configs.

  • Reduce editing errors. Having schema and strict typechecking that supports custom validations, should greatly reduce the number of errors caused by mistyping configs.