You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was thinking about this problem the other day, particularly the "upgrade" scenario (where you want to change the meaning "--strict" to become stricter over time without breaking apps). One solution that occurred to me is to make "tsc --init" be the one with the --strict flag, so a given version of tsc always specifies exactly the set of flags that mean "strict".
That was one option we discussed in this meeting. one thing is we want to avoid is making any promises that we can maintain a specific version behavior (include inferences, relationships, and errors) indefinitely.
The current plan with --strict (implemented by #14486) would include additional checks in the future; users can choose to opt-out of some of these checks directly e.g. --strict --noImplicitAny false.
TS
strict
Mode--strictThisChecks
--strict
tsc --init
would include"strict": true
--noImplicitAny
,--noImplictThis
,--strictNullChecks
,--alwyasStrict
--strict
=>--noImplicitAny true
,--noImplictThis true
,--strictNullChecks true
,--alwyasStrict true
--strict
behaviours by turing them off, e.g.:--strict --noImplicitAny false
=>--noImplictThis true
,--strictNullChecks true
,--alwyasStrict true
--noUnusedParameters
,--noUnusedLocals
,--noImplicitReturns
and--noImplicitFallThrough
?--strict
can get new checks enabled..--loose
flag?require
calls in--m commonJs
handled asimport .. = require("mod")
arguments
as(...args: any[])=>T
new
on functions withthis.p = v
assignmentsthis.prop = value
in functions and classes (roughly translates to property declarations)FuncOrClass.prototype.prop = value
, roughly translates to property declarations in a classFuncOrClass.prop = value
, roughly translates to property declarations in a classmodule.exports.prop = value
, roughly translates toexport var prop = value
exports.prop = value
, roughly translates toexport var prop = value
module.exports = value
, roughly translates toexport = value
The text was updated successfully, but these errors were encountered: