Skip to content
New issue

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

Allow Running TypeScript in Strict Mode #16531

Closed
SlurpTheo opened this issue Jun 14, 2017 · 2 comments
Closed

Allow Running TypeScript in Strict Mode #16531

SlurpTheo opened this issue Jun 14, 2017 · 2 comments
Labels
Bug A bug in TypeScript Good First Issue Well scoped, documented and has the green light Help Wanted You can do this

Comments

@SlurpTheo
Copy link

TypeScript Version:
typescript@rc ([email protected])
typescript@next ([email protected])

Expected behavior:
No SyntaxError.

Actual behavior:

...\path>node --version
v6.11.0

...\path>node --use_strict node_modules\typescript\bin\tsc --version
...\path\node_modules\typescript\lib\tsc.js:40882
            var arguments = node.arguments;
                ^^^^^^^^^
SyntaxError: Unexpected eval or arguments in strict mode

Similar to previous versions/issues:
#9449
#10755

@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Jun 14, 2017
@DanielRosenwasser
Copy link
Member

We'd be willing to take a PR to the release-2.4 and master branches to rename arguments to args.

@DanielRosenwasser DanielRosenwasser added Help Wanted You can do this Good First Issue Well scoped, documented and has the green light labels Jun 14, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Jun 14, 2017

we should also turn --alwaysStrict on on the compiler code base. this should have caught this:

tsc --p src\compiler\tsconfig.json --alwaysStrict

24727             const arguments = node.arguments;
                        ~~~~~~~~~

src/compiler/checker.ts(24727,19): error TS1100: Invalid use of 'arguments' in strict mode.

@mhegazy mhegazy added this to the TypeScript 2.4.1 milestone Jun 15, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Good First Issue Well scoped, documented and has the green light Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

3 participants