TypeScript/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt
2021-08-06 15:00:26 -07:00

84 lines
4.2 KiB
Plaintext

tests/cases/compiler/a.js(5,5): error TS1117: An object literal cannot have multiple properties with the same name in strict mode.
tests/cases/compiler/a.js(5,5): error TS2300: Duplicate identifier 'a'.
tests/cases/compiler/a.js(7,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode.
tests/cases/compiler/a.js(8,8): error TS1102: 'delete' cannot be called on an identifier in strict mode.
tests/cases/compiler/a.js(8,8): error TS2703: The operand of a 'delete' operator must be a property reference.
tests/cases/compiler/a.js(10,10): error TS1100: Invalid use of 'eval' in strict mode.
tests/cases/compiler/a.js(12,10): error TS1100: Invalid use of 'arguments' in strict mode.
tests/cases/compiler/a.js(15,1): error TS1101: 'with' statements are not allowed in strict mode.
tests/cases/compiler/a.js(15,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
tests/cases/compiler/b.js(3,7): error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'eval'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
tests/cases/compiler/b.js(6,13): error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode.
tests/cases/compiler/c.js(1,12): error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode.
tests/cases/compiler/c.js(2,5): error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode.
tests/cases/compiler/d.js(2,9): error TS1121: Octal literals are not allowed in strict mode.
tests/cases/compiler/d.js(2,11): error TS1005: ',' expected.
==== tests/cases/compiler/a.js (9 errors) ====
"use strict";
var a = {
a: "hello", // error
b: 10,
a: 10 // error
~
!!! error TS1117: An object literal cannot have multiple properties with the same name in strict mode.
~
!!! error TS2300: Duplicate identifier 'a'.
};
var let = 10; // error
~~~
!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode.
delete a; // error
~
!!! error TS1102: 'delete' cannot be called on an identifier in strict mode.
~
!!! error TS2703: The operand of a 'delete' operator must be a property reference.
try {
} catch (eval) { // error
~~~~
!!! error TS1100: Invalid use of 'eval' in strict mode.
}
function arguments() { // error
~~~~~~~~~
!!! error TS1100: Invalid use of 'arguments' in strict mode.
}
with (a) {
~~~~
!!! error TS1101: 'with' statements are not allowed in strict mode.
~~~~~~~~
!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.
b = 10;
}
==== tests/cases/compiler/b.js (2 errors) ====
// this is not in strict mode but class definitions are always in strict mode
class c {
a(eval) { //error
~~~~
!!! error TS1210: Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of 'eval'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.
}
method() {
var let = 10; // error
~~~
!!! error TS1213: Identifier expected. 'let' is a reserved word in strict mode. Class definitions are automatically in strict mode.
}
}
==== tests/cases/compiler/c.js (2 errors) ====
export var let = 10; // external modules are automatically in strict mode
~~~
!!! error TS1214: Identifier expected. 'let' is a reserved word in strict mode. Modules are automatically in strict mode.
var eval = function () {
~~~~
!!! error TS1215: Invalid use of 'eval'. Modules are automatically in strict mode.
};
==== tests/cases/compiler/d.js (2 errors) ====
"use strict";
var x = 009; // error
~~
!!! error TS1121: Octal literals are not allowed in strict mode.
~
!!! error TS1005: ',' expected.