8000 Allow to run TypeScript (Services) in strict mode · Issue #10755 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
Allow to run TypeScript (Services) in strict mode #10755
Closed
@kpreisser

Description

@kpreisser

Hi,
this is a follow-up issue to #9449.

TypeScript Version: master (4685646)

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

(running current master)

As @HerringtonDarkholme noted, this causes an error in the Closure Compiler.

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.

Thanks!

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0