We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
tsc.js
typescriptServices.js
tsserver.js
static
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!
The text was updated successfully, but these errors were encountered:
I also encounter this when trying to compress typescript services using Closure compiler.
@mhegazy can I submit a pull request for this? Or you prefer to do it yourself?
Sorry, something went wrong.
Merge pull request #9473 from HerringtonDarkholme/fix_static
0a682f1
[Fix #9449]change variable name for strict mode
thanks @HerringtonDarkholme.
No branches or pull requests
TypeScript Version: master
Currently,
tsc.js
,typescriptServices.js
andtsserver.js
cannot be run in a strict mode environment due to using the identifierstatic
inchecker.ts
.static
is a reserved identifier in strict mode, so if you run tsc.js with Node in strict mode, it will fail: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!
The text was updated successfully, but these errors were encountered: