Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: