TypeScript · Junior · Question 27 of 75
What does the strict flag in tsconfig.json enable?
- ✓Correct answer: A set of strict checks:
strictNullChecks,noImplicitAnyand others - 2
'use strict'mode in the compiled JavaScript and nothing else - 3A ban on using
anyandasin any form
Explanation
strict: true enables a family of flags: strictNullChecks, noImplicitAny, strictFunctionTypes, strictBindCallApply, useUnknownInCatchVariables and others. New projects should start with strict. It doesn't forbid explicit any - there are linter rules for that.