Closed
Description
TypeScript Version: master
Currently, tsc.js
, typescriptServices.js
and tsserver.js
cannot be run in a strict mode environment due to using the identifier static
in checker.ts
.
static
is a reserved identifier in strict mode, so if you run tsc.js with Node in strict mode, it will fail:
C:\Users\VPC\Desktop\TypeScriptOrg\built\local>node --use_strict tsc.js
C:\Users\VPC\Desktop\TypeScriptOrg\built\local\tsc.js:24019
var static = ts.forEach(member.modifiers, function (m) { return m.kind === 113; });
^^^^^^
SyntaxError: Unexpected strict mode reserved word
I think it is reasonable to allow TypeScript to be run in a strict mode environment, by changing the name of the variable.
PS: Is there a reason why the TypeScript sources don't use strict mode in general?
Thanks!