Q48: What individual compiler options are enabled by setting `"strict": true` in `tsconfig.json`?
Enabling "strict": true activates strict type checking compiler options:
noImplicitAny: Raises errors on expressions inferred asany.strictNullChecks: Ensuresnullandundefinedare not assignable to other types unless explicitly unioned.strictFunctionTypes: Enforces contravariant parameter checking on function signatures.strictBindCallApply: Enforces strict type matching on.bind(),.call(), and.apply().strictPropertyInitialization: Ensures class properties are initialized in the constructor.
Key Takeaways
- Always enable
"strict": truein modern TypeScript projects.