2 ms·
> I do wonder how you create type-safe config files though The types help prevent erroneous config declarations. e.g ``` enum LogLevel { Info = "info",
by shusson 8y ago
> I do wonder how you create type-safe config files though
The types help prevent erroneous config declarations.
e.g
```
enum LogLevel {
Info = "info",
Debug = "debug"
}
const MyConfig = {
logOptions: {
level: LogLevel.Debug
}
};
```
And since we serialise `MyConfig`, the config has to be transpiled by Typescript.