Totaly Strict Typscript
Typescript is flawed system made with highest priority for following: "make every javascript file valid typescript file".
Becouse of this goal, some of the compromises where made in both design of the type system (not sound) any,
and some of the compilers configs where loosend on purpuse to optimize for adoption rather then x.
To aliviate this, one should strive to move to more strictnes over time, and start with following if one is starting new code base.
{
"compilerOptions": {
// Core strictness
"strict": true,
// Extra soundness-ish stuff
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"noPropertyAccessFromIndexSignature": true,
// Hygiene / correctness
"noImplicitOverride": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noEmitOnError": true
}
}
- Next:
- Previous: Anchor Position resources and Demos