Typescript: Allow Running TypeScript in Strict Mode

Created on 14 Jun 2017  ·  2Comments  ·  Source: microsoft/TypeScript

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:
https://github.com/Microsoft/TypeScript/issues/9449
https://github.com/Microsoft/TypeScript/issues/10755

Bug good first issue help wanted

Most helpful comment

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.

All 2 comments

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

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.

Was this page helpful?
0 / 5 - 0 ratings