You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @tusharmath; I've just been looking for a typescript library to handle a more complex configuration; this is one of the first I came across. Looks promising but I missed the typing I had in say env-var. So I like the approach above.
It's been long, and I think this library needs a re-write :)
Here is the first draft of the proposed design.
Define your config using the following signature. This is better than a pre-build step
Then we create Config Sources. Sources are just a way to read arbitrary data and convert it into a JSON format.
We can create any arbitrary source also using the
make
constructor.We can merge the sources as follows:
Once a source is ready we can convert to config using the
schema
In your application you can now use
config
to access value, and useConfig
as it's type.The text was updated successfully, but these errors were encountered: