@minsky-org/tsconfig
v0.1.0
Published
Four configs. `base` carries the strictness the org treats as non-negotiable, and the other three only add an environment.
Readme
@minsky-org/tsconfig
Four configs. base carries the strictness the org treats as non-negotiable, and the
other three only add an environment.
| File | Use for |
| -------------- | ------------------------------------------------------ |
| base.json | anything, extended by the rest |
| node.json | servers, workers, CLIs (types: ["node"], noEmit) |
| react.json | browser apps (jsx: react-jsx, DOM libs, noEmit) |
| library.json | publishable packages (declarations, src -> dist) |
{
"extends": "@minsky-org/tsconfig/library.json",
"include": ["src"],
"exclude": ["src/**/*.test.ts"]
}Two flags do most of the work and are the ones people try to turn off:
exactOptionalPropertyTypes:{ x: undefined }is not a validx?: string. Build the object with a conditional spread,...(cond ? { x } : {}).noUncheckedIndexedAccess:arr[0]andrecord[key]areT | undefined, because they are. Narrow at the access.
