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
{{ message }}
Repository navigation
Allow to run TypeScript (Services) in strict mode #10755
After PR #9353 has been merged, typescriptServices.js (in this case) again cannot be run in strict mode due to using the identifier package in services.ts, which is a reserved word in strict mode:
C:\Users\VPC\Desktop\TypeScript\built\local>node --use_strict typescriptServices.js
C:\Users\VPC\Desktop\TypeScript\built\local\typescriptServices.js:68849
var package = _d[_c];
^^^^^^^
SyntaxError: Unexpected strict mode reserved word
Now that TSC requires at least ES5 (#10125), might there be an option to add "use strict"; to the ts files of the TypeScript repo? This should prevent using such reserved identifiers.
Activity
Fix #10755: remove uses of `package` as an identifier name
mhegazy commentedon Sep 7, 2016
I have a fix to remove the use of
packagein #10757. the longer term change is to add a new flag to parse a project in strict mode.Merge pull request #10757 from Microsoft/Fix10755
kpreisser commentedon Sep 7, 2016
Thanks!
mhegazy commentedon Sep 7, 2016
Filed #10758 to track adding the compiler option.