diff --git a/tests/baselines/reference/binaryIntegerLiteral.errors.txt b/tests/baselines/reference/binaryIntegerLiteral.errors.txt new file mode 100644 index 0000000000000..f6f60fbcd431e --- /dev/null +++ b/tests/baselines/reference/binaryIntegerLiteral.errors.txt @@ -0,0 +1,60 @@ +binaryIntegerLiteral.ts(25,1): error TS7053: Element implicitly has an 'any' type because expression of type '"0b11010"' can't be used to index type '{ 26: string; a: number; bin1: number; b: number; Infinity: boolean; }'. + Property '0b11010' does not exist on type '{ 26: string; a: number; bin1: number; b: number; Infinity: boolean; }'. +binaryIntegerLiteral.ts(34,1): error TS7053: Element implicitly has an 'any' type because expression of type '"0B11010"' can't be used to index type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + Property '0B11010' does not exist on type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. +binaryIntegerLiteral.ts(40,1): error TS7053: Element implicitly has an 'any' type because expression of type '"Infinity"' can't be used to index type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + Property 'Infinity' does not exist on type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + + +==== binaryIntegerLiteral.ts (3 errors) ==== + var bin1 = 0b11010; + var bin2 = 0B11010; + var bin3 = 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111; + var bin4 = 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111; + + var obj1 = { + 0b11010: "Hello", + a: bin1, + bin1, + b: 0b11010, + 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true, + } + + var obj2 = { + 0B11010: "World", + a: bin2, + bin2, + b: 0B11010, + 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false, + } + + obj1[0b11010]; // string + obj1[26]; // string + obj1["26"]; // string + obj1["0b11010"]; // any + ~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"0b11010"' can't be used to index type '{ 26: string; a: number; bin1: number; b: number; Infinity: boolean; }'. +!!! error TS7053: Property '0b11010' does not exist on type '{ 26: string; a: number; bin1: number; b: number; Infinity: boolean; }'. + obj1["a"]; // number + obj1["b"]; // number + obj1["bin1"]; // number + obj1["Infinity"]; // boolean + + obj2[0B11010]; // string + obj2[26]; // string + obj2["26"]; // string + obj2["0B11010"]; // any + ~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"0B11010"' can't be used to index type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. +!!! error TS7053: Property '0B11010' does not exist on type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + obj2["a"]; // number + obj2["b"]; // number + obj2["bin2"]; // number + obj2[9.671406556917009e+24]; // boolean + obj2["9.671406556917009e+24"]; // boolean + obj2["Infinity"]; // any + ~~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"Infinity"' can't be used to index type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. +!!! error TS7053: Property 'Infinity' does not exist on type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + + \ No newline at end of file diff --git a/tests/baselines/reference/binaryIntegerLiteral.js b/tests/baselines/reference/binaryIntegerLiteral.js index da55042b1a984..7ced848a14c05 100644 --- a/tests/baselines/reference/binaryIntegerLiteral.js +++ b/tests/baselines/reference/binaryIntegerLiteral.js @@ -45,6 +45,7 @@ obj2["Infinity"]; // any //// [binaryIntegerLiteral.js] +"use strict"; var bin1 = 26; var bin2 = 26; var bin3 = 9.671406556917009e+24; diff --git a/tests/baselines/reference/binaryIntegerLiteral.types b/tests/baselines/reference/binaryIntegerLiteral.types index 9bb5101b0e371..50471191dcec4 100644 --- a/tests/baselines/reference/binaryIntegerLiteral.types +++ b/tests/baselines/reference/binaryIntegerLiteral.types @@ -120,7 +120,8 @@ obj1["26"]; // string > : ^^^^ obj1["0b11010"]; // any ->obj1["0b11010"] : error +>obj1["0b11010"] : any +> : ^^^ >obj1 : { 26: string; a: number; bin1: number; b: number; Infinity: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"0b11010" : "0b11010" @@ -183,7 +184,8 @@ obj2["26"]; // string > : ^^^^ obj2["0B11010"]; // any ->obj2["0B11010"] : error +>obj2["0B11010"] : any +> : ^^^ >obj2 : { 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"0B11010" : "0B11010" @@ -230,7 +232,8 @@ obj2["9.671406556917009e+24"]; // boolean > : ^^^^^^^^^^^^^^^^^^^^^^^ obj2["Infinity"]; // any ->obj2["Infinity"] : error +>obj2["Infinity"] : any +> : ^^^ >obj2 : { 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"Infinity" : "Infinity" diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.errors.txt b/tests/baselines/reference/binaryIntegerLiteralES6.errors.txt new file mode 100644 index 0000000000000..9e571c6de823f --- /dev/null +++ b/tests/baselines/reference/binaryIntegerLiteralES6.errors.txt @@ -0,0 +1,61 @@ +binaryIntegerLiteralES6.ts(25,1): error TS7053: Element implicitly has an 'any' type because expression of type '"0b11010"' can't be used to index type '{ 26: string; a: number; bin1: number; b: number; Infinity: boolean; }'. + Property '0b11010' does not exist on type '{ 26: string; a: number; bin1: number; b: number; Infinity: boolean; }'. +binaryIntegerLiteralES6.ts(34,1): error TS7053: Element implicitly has an 'any' type because expression of type '"0B11010"' can't be used to index type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + Property '0B11010' does not exist on type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. +binaryIntegerLiteralES6.ts(40,1): error TS7053: Element implicitly has an 'any' type because expression of type '"Infinity"' can't be used to index type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + Property 'Infinity' does not exist on type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + + +==== binaryIntegerLiteralES6.ts (3 errors) ==== + var bin1 = 0b11010; + var bin2 = 0B11010; + var bin3 = 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111; + var bin4 = 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111; + + var obj1 = { + 0b11010: "Hello", + a: bin1, + bin1, + b: 0b11010, + 0B111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101001010100000010111110001111111111: true, + } + + var obj2 = { + 0B11010: "World", + a: bin2, + bin2, + b: 0B11010, + 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111: false, + } + + obj1[0b11010]; // string + obj1[26]; // string + obj1["26"]; // string + obj1["0b11010"]; // any + ~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"0b11010"' can't be used to index type '{ 26: string; a: number; bin1: number; b: number; Infinity: boolean; }'. +!!! error TS7053: Property '0b11010' does not exist on type '{ 26: string; a: number; bin1: number; b: number; Infinity: boolean; }'. + obj1["a"]; // number + obj1["b"]; // number + obj1["bin1"]; // number + obj1["Infinity"]; // boolean + + obj2[0B11010]; // string + obj2[26]; // string + obj2["26"]; // string + obj2["0B11010"]; // any + ~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"0B11010"' can't be used to index type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. +!!! error TS7053: Property '0B11010' does not exist on type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + obj2["a"]; // number + obj2["b"]; // number + obj2["bin2"]; // number + obj2[9.671406556917009e+24]; // boolean + obj2["9.671406556917009e+24"]; // boolean + obj2["Infinity"]; // any + ~~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"Infinity"' can't be used to index type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. +!!! error TS7053: Property 'Infinity' does not exist on type '{ 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; }'. + + + \ No newline at end of file diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.js b/tests/baselines/reference/binaryIntegerLiteralES6.js index f5f939072bc37..495479b362042 100644 --- a/tests/baselines/reference/binaryIntegerLiteralES6.js +++ b/tests/baselines/reference/binaryIntegerLiteralES6.js @@ -46,6 +46,7 @@ obj2["Infinity"]; // any //// [binaryIntegerLiteralES6.js] +"use strict"; var bin1 = 0b11010; var bin2 = 0B11010; var bin3 = 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111; diff --git a/tests/baselines/reference/binaryIntegerLiteralES6.types b/tests/baselines/reference/binaryIntegerLiteralES6.types index 8d0eeeb271a0d..c0a9f5e8bb162 100644 --- a/tests/baselines/reference/binaryIntegerLiteralES6.types +++ b/tests/baselines/reference/binaryIntegerLiteralES6.types @@ -120,7 +120,8 @@ obj1["26"]; // string > : ^^^^ obj1["0b11010"]; // any ->obj1["0b11010"] : error +>obj1["0b11010"] : any +> : ^^^ >obj1 : { 26: string; a: number; bin1: number; b: number; Infinity: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"0b11010" : "0b11010" @@ -183,7 +184,8 @@ obj2["26"]; // string > : ^^^^ obj2["0B11010"]; // any ->obj2["0B11010"] : error +>obj2["0B11010"] : any +> : ^^^ >obj2 : { 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"0B11010" : "0B11010" @@ -230,7 +232,8 @@ obj2["9.671406556917009e+24"]; // boolean > : ^^^^^^^^^^^^^^^^^^^^^^^ obj2["Infinity"]; // any ->obj2["Infinity"] : error +>obj2["Infinity"] : any +> : ^^^ >obj2 : { 26: string; a: number; bin2: number; b: number; 9.671406556917009e+24: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"Infinity" : "Infinity" diff --git a/tests/baselines/reference/binaryIntegerLiteralError.js b/tests/baselines/reference/binaryIntegerLiteralError.js index b46f6a1216748..b35924f48210e 100644 --- a/tests/baselines/reference/binaryIntegerLiteralError.js +++ b/tests/baselines/reference/binaryIntegerLiteralError.js @@ -13,6 +13,7 @@ var obj1 = { //// [binaryIntegerLiteralError.js] +"use strict"; // error var bin1 = 6; 2110; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.errors.txt b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.errors.txt new file mode 100644 index 0000000000000..3bb3489739c31 --- /dev/null +++ b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.errors.txt @@ -0,0 +1,45 @@ +contextualTypeWithUnionTypeCallSignatures.ts(33,54): error TS7006: Parameter 'a' implicitly has an 'any' type. +contextualTypeWithUnionTypeCallSignatures.ts(36,54): error TS7006: Parameter 'a' implicitly has an 'any' type. + + +==== contextualTypeWithUnionTypeCallSignatures.ts (2 errors) ==== + // When used as a contextual type, a union type U has those members that are present in any of + // its constituent types, with types that are unions of the respective members in the constituent types. + + // Let S be the set of types in U that have call signatures. + // If S is not empty and the sets of call signatures of the types in S are identical ignoring return types, + // U has the same set of call signatures, but with return types that are unions of the return types of the respective call signatures from each type in S. + + interface IWithNoCallSignatures { + foo: string; + } + interface IWithCallSignatures { + (a: number): string; + } + interface IWithCallSignatures2 { + (a: number): number; + } + interface IWithCallSignatures3 { + (b: string): number; + } + interface IWithCallSignatures4 { + (a: number): string; + (a: string, b: number): number; + } + + // With no call signature | callSignatures + var x: IWithNoCallSignatures | IWithCallSignatures = a => a.toString(); + + // With call signatures with different return type + var x2: IWithCallSignatures | IWithCallSignatures2 = a => a.toString(); // Like iWithCallSignatures + var x2: IWithCallSignatures | IWithCallSignatures2 = a => a; // Like iWithCallSignatures2 + + // With call signatures of mismatching parameter type + var x3: IWithCallSignatures | IWithCallSignatures3 = a => /*here a should be any*/ a.toString(); + ~ +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. + + // With call signature count mismatch + var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any*/ a.toString(); + ~ +!!! error TS7006: Parameter 'a' implicitly has an 'any' type. \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js index 8fd3f92801786..b6d356b20eb95 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js +++ b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/types/union/contextualTypeWithUnionTypeCallSignatures.ts] //// //// [contextualTypeWithUnionTypeCallSignatures.ts] -//When used as a contextual type, a union type U has those members that are present in any of +// When used as a contextual type, a union type U has those members that are present in any of // its constituent types, with types that are unions of the respective members in the constituent types. // Let S be the set of types in U that have call signatures. @@ -39,7 +39,8 @@ var x3: IWithCallSignatures | IWithCallSignatures3 = a => /*here a should be any var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any*/ a.toString(); //// [contextualTypeWithUnionTypeCallSignatures.js] -//When used as a contextual type, a union type U has those members that are present in any of +"use strict"; +// When used as a contextual type, a union type U has those members that are present in any of // its constituent types, with types that are unions of the respective members in the constituent types. // With no call signature | callSignatures var x = function (a) { return a.toString(); }; diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols index 545d5aece2c4e..63d9ef364743f 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols +++ b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols @@ -1,7 +1,7 @@ //// [tests/cases/conformance/types/union/contextualTypeWithUnionTypeCallSignatures.ts] //// === contextualTypeWithUnionTypeCallSignatures.ts === -//When used as a contextual type, a union type U has those members that are present in any of +// When used as a contextual type, a union type U has those members that are present in any of // its constituent types, with types that are unions of the respective members in the constituent types. // Let S be the set of types in U that have call signatures. @@ -84,7 +84,5 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any >IWithCallSignatures : Symbol(IWithCallSignatures, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 9, 1)) >IWithCallSignatures4 : Symbol(IWithCallSignatures4, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 18, 1)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52)) ->a.toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52)) ->toString : Symbol(Number.toString, Decl(lib.es5.d.ts, --, --)) diff --git a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.types b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.types index d5470ad755e56..9307df9a32b84 100644 --- a/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.types +++ b/tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.types @@ -1,7 +1,7 @@ //// [tests/cases/conformance/types/union/contextualTypeWithUnionTypeCallSignatures.ts] //// === contextualTypeWithUnionTypeCallSignatures.ts === -//When used as a contextual type, a union type U has those members that are present in any of +// When used as a contextual type, a union type U has those members that are present in any of // its constituent types, with types that are unions of the respective members in the constituent types. // Let S be the set of types in U that have call signatures. @@ -91,8 +91,11 @@ var x3: IWithCallSignatures | IWithCallSignatures3 = a => /*here a should be any >a => /*here a should be any*/ a.toString() : (a: any) => any > : ^ ^^^^^^^^^^^^^ >a : any +> : ^^^ >a.toString() : any +> : ^^^ >a.toString : any +> : ^^^ >a : any > : ^^^ >toString : any @@ -102,16 +105,16 @@ var x3: IWithCallSignatures | IWithCallSignatures3 = a => /*here a should be any var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any*/ a.toString(); >x4 : IWithCallSignatures | IWithCallSignatures4 > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ->a => /*here a should be any*/ a.toString() : (a: number) => string -> : ^ ^^^^^^^^^^^^^^^^^^^ ->a : number -> : ^^^^^^ ->a.toString() : string -> : ^^^^^^ ->a.toString : (radix?: number) => string -> : ^ ^^^ ^^^^^ ->a : number -> : ^^^^^^ ->toString : (radix?: number) => string -> : ^ ^^^ ^^^^^ +>a => /*here a should be any*/ a.toString() : (a: any) => any +> : ^ ^^^^^^^^^^^^^ +>a : any +> : ^^^ +>a.toString() : any +> : ^^^ +>a.toString : any +> : ^^^ +>a : any +> : ^^^ +>toString : any +> : ^^^ diff --git a/tests/baselines/reference/emitArrowFunction.js b/tests/baselines/reference/emitArrowFunction.js index c069222e03ff7..01c0de35e26e5 100644 --- a/tests/baselines/reference/emitArrowFunction.js +++ b/tests/baselines/reference/emitArrowFunction.js @@ -3,7 +3,7 @@ //// [emitArrowFunction.ts] var f1 = () => { } var f2 = (x: string, y: string) => { } -var f3 = (x: string, y: number, ...rest) => { } +var f3 = (x: string, y: number, ...rest: any[]) => { } var f4 = (x: string, y: number, z = 10) => { } function foo(func: () => boolean) { } foo(() => true); diff --git a/tests/baselines/reference/emitArrowFunction.symbols b/tests/baselines/reference/emitArrowFunction.symbols index 470907adb9e31..3529cacc8a3fe 100644 --- a/tests/baselines/reference/emitArrowFunction.symbols +++ b/tests/baselines/reference/emitArrowFunction.symbols @@ -9,7 +9,7 @@ var f2 = (x: string, y: string) => { } >x : Symbol(x, Decl(emitArrowFunction.ts, 1, 10)) >y : Symbol(y, Decl(emitArrowFunction.ts, 1, 20)) -var f3 = (x: string, y: number, ...rest) => { } +var f3 = (x: string, y: number, ...rest: any[]) => { } >f3 : Symbol(f3, Decl(emitArrowFunction.ts, 2, 3)) >x : Symbol(x, Decl(emitArrowFunction.ts, 2, 10)) >y : Symbol(y, Decl(emitArrowFunction.ts, 2, 20)) diff --git a/tests/baselines/reference/emitArrowFunction.types b/tests/baselines/reference/emitArrowFunction.types index 15aa95ac5b724..c139f116d7ba5 100644 --- a/tests/baselines/reference/emitArrowFunction.types +++ b/tests/baselines/reference/emitArrowFunction.types @@ -17,11 +17,11 @@ var f2 = (x: string, y: string) => { } >y : string > : ^^^^^^ -var f3 = (x: string, y: number, ...rest) => { } +var f3 = (x: string, y: number, ...rest: any[]) => { } >f3 : (x: string, y: number, ...rest: any[]) => void -> : ^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->(x: string, y: number, ...rest) => { } : (x: string, y: number, ...rest: any[]) => void -> : ^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ +>(x: string, y: number, ...rest: any[]) => { } : (x: string, y: number, ...rest: any[]) => void +> : ^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ >y : number diff --git a/tests/baselines/reference/emitArrowFunctionES6.js b/tests/baselines/reference/emitArrowFunctionES6.js index cda6fdf374427..de57e1b9ce811 100644 --- a/tests/baselines/reference/emitArrowFunctionES6.js +++ b/tests/baselines/reference/emitArrowFunctionES6.js @@ -3,7 +3,7 @@ //// [emitArrowFunctionES6.ts] var f1 = () => { } var f2 = (x: string, y: string) => { } -var f3 = (x: string, y: number, ...rest) => { } +var f3 = (x: string, y: number, ...rest: any[]) => { } var f4 = (x: string, y: number, z=10) => { } function foo(func: () => boolean) { } foo(() => true); diff --git a/tests/baselines/reference/emitArrowFunctionES6.symbols b/tests/baselines/reference/emitArrowFunctionES6.symbols index f16d33bd859b5..555acbb2ff8e5 100644 --- a/tests/baselines/reference/emitArrowFunctionES6.symbols +++ b/tests/baselines/reference/emitArrowFunctionES6.symbols @@ -9,7 +9,7 @@ var f2 = (x: string, y: string) => { } >x : Symbol(x, Decl(emitArrowFunctionES6.ts, 1, 10)) >y : Symbol(y, Decl(emitArrowFunctionES6.ts, 1, 20)) -var f3 = (x: string, y: number, ...rest) => { } +var f3 = (x: string, y: number, ...rest: any[]) => { } >f3 : Symbol(f3, Decl(emitArrowFunctionES6.ts, 2, 3)) >x : Symbol(x, Decl(emitArrowFunctionES6.ts, 2, 10)) >y : Symbol(y, Decl(emitArrowFunctionES6.ts, 2, 20)) diff --git a/tests/baselines/reference/emitArrowFunctionES6.types b/tests/baselines/reference/emitArrowFunctionES6.types index 3925aeeaf3766..690c35608d3ce 100644 --- a/tests/baselines/reference/emitArrowFunctionES6.types +++ b/tests/baselines/reference/emitArrowFunctionES6.types @@ -17,11 +17,11 @@ var f2 = (x: string, y: string) => { } >y : string > : ^^^^^^ -var f3 = (x: string, y: number, ...rest) => { } +var f3 = (x: string, y: number, ...rest: any[]) => { } >f3 : (x: string, y: number, ...rest: any[]) => void -> : ^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ ->(x: string, y: number, ...rest) => { } : (x: string, y: number, ...rest: any[]) => void -> : ^ ^^ ^^ ^^ ^^^^^ ^^^^^^^^^^^^^^^^ +> : ^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ +>(x: string, y: number, ...rest: any[]) => { } : (x: string, y: number, ...rest: any[]) => void +> : ^ ^^ ^^ ^^ ^^^^^ ^^ ^^^^^^^^^ >x : string > : ^^^^^^ >y : number diff --git a/tests/baselines/reference/jsDocFunctionSignatures5.baseline b/tests/baselines/reference/jsDocFunctionSignatures5.baseline index 0adafac99599c..42dd6f6da3b6f 100644 --- a/tests/baselines/reference/jsDocFunctionSignatures5.baseline +++ b/tests/baselines/reference/jsDocFunctionSignatures5.baseline @@ -14,7 +14,7 @@ // pathFilter('foo', 'bar', 'baz', {}); // ^ // | ---------------------------------------------------------------------- -// | pathFilter(**basePath: string**, pattern: string, type: string, options: any): any[] +// | pathFilter(**basePath: string**, pattern: string, type: string, options: Object): any[] // | Filters a path based on a regexp or glob pattern. // | @param basePath The base path where the search will be performed. // | @param pattern A string defining a regexp of a glob pattern. @@ -190,8 +190,8 @@ "kind": "space" }, { - "text": "any", - "kind": "keyword" + "text": "Object", + "kind": "localName" } ], "isOptional": false, diff --git a/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline b/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline index eaa535157e122..1d8dcc4ccb3e5 100644 --- a/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline +++ b/tests/baselines/reference/jsDocTypeTagQuickInfo1.baseline @@ -60,7 +60,7 @@ // var Obj; // ^^^ // | ---------------------------------------------------------------------- -// | var Obj: any +// | var Obj: Object // | @type {Object} // | ---------------------------------------------------------------------- // /** @type {Function} */ @@ -572,8 +572,8 @@ "kind": "space" }, { - "text": "any", - "kind": "keyword" + "text": "Object", + "kind": "localName" } ], "documentation": [], diff --git a/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline b/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline index eef0206fc22c8..9b7926dba6d34 100644 --- a/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline +++ b/tests/baselines/reference/jsDocTypeTagQuickInfo2.baseline @@ -46,21 +46,21 @@ // var a; // ^ // | ---------------------------------------------------------------------- -// | var a: any[] +// | var a: array // | @type {array} // | ---------------------------------------------------------------------- // /** @type {promise} */ // var p; // ^ // | ---------------------------------------------------------------------- -// | var p: Promise +// | var p: promise // | @type {promise} // | ---------------------------------------------------------------------- // /** @type {?number} */ // var nullable; // ^^^^^^^^ // | ---------------------------------------------------------------------- -// | var nullable: number +// | var nullable: number | null // | @type {?number} // | ---------------------------------------------------------------------- // /** @type {function} */ @@ -439,16 +439,8 @@ "kind": "space" }, { - "text": "any", - "kind": "keyword" - }, - { - "text": "[", - "kind": "punctuation" - }, - { - "text": "]", - "kind": "punctuation" + "text": "array", + "kind": "text" } ], "documentation": [], @@ -500,20 +492,8 @@ "kind": "space" }, { - "text": "Promise", - "kind": "interfaceName" - }, - { - "text": "<", - "kind": "punctuation" - }, - { - "text": "any", - "kind": "keyword" - }, - { - "text": ">", - "kind": "punctuation" + "text": "promise", + "kind": "text" } ], "documentation": [], @@ -567,6 +547,22 @@ { "text": "number", "kind": "keyword" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "|", + "kind": "punctuation" + }, + { + "text": " ", + "kind": "space" + }, + { + "text": "null", + "kind": "keyword" } ], "documentation": [], diff --git a/tests/baselines/reference/octalIntegerLiteral.errors.txt b/tests/baselines/reference/octalIntegerLiteral.errors.txt new file mode 100644 index 0000000000000..0f10c990611b6 --- /dev/null +++ b/tests/baselines/reference/octalIntegerLiteral.errors.txt @@ -0,0 +1,58 @@ +octalIntegerLiteral.ts(23,1): error TS7053: Element implicitly has an 'any' type because expression of type '"0o45436"' can't be used to index type '{ 19230: string; a: number; b: number; oct1: number; Infinity: boolean; }'. + Property '0o45436' does not exist on type '{ 19230: string; a: number; b: number; oct1: number; Infinity: boolean; }'. +octalIntegerLiteral.ts(32,1): error TS7053: Element implicitly has an 'any' type because expression of type '"0O45436"' can't be used to index type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. + Property '0O45436' does not exist on type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. +octalIntegerLiteral.ts(40,1): error TS7053: Element implicitly has an 'any' type because expression of type '"Infinity"' can't be used to index type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. + Property 'Infinity' does not exist on type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. + + +==== octalIntegerLiteral.ts (3 errors) ==== + var oct1 = 0o45436; + var oct2 = 0O45436; + var oct3 = 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777; + var oct4 = 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777; + + var obj1 = { + 0o45436: "Hello", + a: 0o45436, + b: oct1, + oct1, + 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: true + } + + var obj2 = { + 0O45436: "hi", + a: 0O45436, + b: oct2, + oct2, + 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: false, + } + + obj1[0o45436]; // string + obj1["0o45436"]; // any + ~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"0o45436"' can't be used to index type '{ 19230: string; a: number; b: number; oct1: number; Infinity: boolean; }'. +!!! error TS7053: Property '0o45436' does not exist on type '{ 19230: string; a: number; b: number; oct1: number; Infinity: boolean; }'. + obj1["19230"]; // string + obj1[19230]; // string + obj1["a"]; // number + obj1["b"]; // number + obj1["oct1"]; // number + obj1["Infinity"]; // boolean + + obj2[0O45436]; // string + obj2["0O45436"]; // any + ~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"0O45436"' can't be used to index type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. +!!! error TS7053: Property '0O45436' does not exist on type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. + obj2["19230"]; // string + obj2[19230]; // string + obj2["a"]; // number + obj2["b"]; // number + obj2["oct2"]; // number + obj2[5.462437423415177e+244]; // boolean + obj2["5.462437423415177e+244"]; // boolean + obj2["Infinity"]; // any + ~~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"Infinity"' can't be used to index type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. +!!! error TS7053: Property 'Infinity' does not exist on type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. \ No newline at end of file diff --git a/tests/baselines/reference/octalIntegerLiteral.js b/tests/baselines/reference/octalIntegerLiteral.js index 45c4e2c905691..6c686e95d6f2b 100644 --- a/tests/baselines/reference/octalIntegerLiteral.js +++ b/tests/baselines/reference/octalIntegerLiteral.js @@ -43,6 +43,7 @@ obj2["5.462437423415177e+244"]; // boolean obj2["Infinity"]; // any //// [octalIntegerLiteral.js] +"use strict"; var oct1 = 19230; var oct2 = 19230; var oct3 = Infinity; diff --git a/tests/baselines/reference/octalIntegerLiteral.types b/tests/baselines/reference/octalIntegerLiteral.types index 9f31cbad6f95e..ee7f3cb650996 100644 --- a/tests/baselines/reference/octalIntegerLiteral.types +++ b/tests/baselines/reference/octalIntegerLiteral.types @@ -104,7 +104,8 @@ obj1[0o45436]; // string > : ^^^^^ obj1["0o45436"]; // any ->obj1["0o45436"] : error +>obj1["0o45436"] : any +> : ^^^ >obj1 : { 19230: string; a: number; b: number; oct1: number; Infinity: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"0o45436" : "0o45436" @@ -167,7 +168,8 @@ obj2[0O45436]; // string > : ^^^^^ obj2["0O45436"]; // any ->obj2["0O45436"] : error +>obj2["0O45436"] : any +> : ^^^ >obj2 : { 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"0O45436" : "0O45436" @@ -230,7 +232,8 @@ obj2["5.462437423415177e+244"]; // boolean > : ^^^^^^^^^^^^^^^^^^^^^^^^ obj2["Infinity"]; // any ->obj2["Infinity"] : error +>obj2["Infinity"] : any +> : ^^^ >obj2 : { 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"Infinity" : "Infinity" diff --git a/tests/baselines/reference/octalIntegerLiteralES6.errors.txt b/tests/baselines/reference/octalIntegerLiteralES6.errors.txt new file mode 100644 index 0000000000000..3e2c2b88e6836 --- /dev/null +++ b/tests/baselines/reference/octalIntegerLiteralES6.errors.txt @@ -0,0 +1,58 @@ +octalIntegerLiteralES6.ts(23,1): error TS7053: Element implicitly has an 'any' type because expression of type '"0o45436"' can't be used to index type '{ 19230: string; a: number; b: number; oct1: number; Infinity: boolean; }'. + Property '0o45436' does not exist on type '{ 19230: string; a: number; b: number; oct1: number; Infinity: boolean; }'. +octalIntegerLiteralES6.ts(32,1): error TS7053: Element implicitly has an 'any' type because expression of type '"0O45436"' can't be used to index type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. + Property '0O45436' does not exist on type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. +octalIntegerLiteralES6.ts(40,1): error TS7053: Element implicitly has an 'any' type because expression of type '"Infinity"' can't be used to index type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. + Property 'Infinity' does not exist on type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. + + +==== octalIntegerLiteralES6.ts (3 errors) ==== + var oct1 = 0o45436; + var oct2 = 0O45436; + var oct3 = 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777; + var oct4 = 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777; + + var obj1 = { + 0o45436: "Hello", + a: 0o45436, + b: oct1, + oct1, + 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: true + } + + var obj2 = { + 0O45436: "hi", + a: 0O45436, + b: oct2, + oct2, + 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777: false, + } + + obj1[0o45436]; // string + obj1["0o45436"]; // any + ~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"0o45436"' can't be used to index type '{ 19230: string; a: number; b: number; oct1: number; Infinity: boolean; }'. +!!! error TS7053: Property '0o45436' does not exist on type '{ 19230: string; a: number; b: number; oct1: number; Infinity: boolean; }'. + obj1["19230"]; // string + obj1[19230]; // string + obj1["a"]; // number + obj1["b"]; // number + obj1["oct1"]; // number + obj1["Infinity"]; // boolean + + obj2[0O45436]; // string + obj2["0O45436"]; // any + ~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"0O45436"' can't be used to index type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. +!!! error TS7053: Property '0O45436' does not exist on type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. + obj2["19230"]; // string + obj2[19230]; // string + obj2["a"]; // number + obj2["b"]; // number + obj2["oct2"]; // number + obj2[5.462437423415177e+244]; // boolean + obj2["5.462437423415177e+244"]; // boolean + obj2["Infinity"]; // any + ~~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"Infinity"' can't be used to index type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. +!!! error TS7053: Property 'Infinity' does not exist on type '{ 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; }'. \ No newline at end of file diff --git a/tests/baselines/reference/octalIntegerLiteralES6.js b/tests/baselines/reference/octalIntegerLiteralES6.js index 702904caae191..91fc13b61db95 100644 --- a/tests/baselines/reference/octalIntegerLiteralES6.js +++ b/tests/baselines/reference/octalIntegerLiteralES6.js @@ -43,6 +43,7 @@ obj2["5.462437423415177e+244"]; // boolean obj2["Infinity"]; // any //// [octalIntegerLiteralES6.js] +"use strict"; var oct1 = 0o45436; var oct2 = 0O45436; var oct3 = 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777; diff --git a/tests/baselines/reference/octalIntegerLiteralES6.types b/tests/baselines/reference/octalIntegerLiteralES6.types index e51fe63ecc6aa..6bdea159c083a 100644 --- a/tests/baselines/reference/octalIntegerLiteralES6.types +++ b/tests/baselines/reference/octalIntegerLiteralES6.types @@ -104,7 +104,8 @@ obj1[0o45436]; // string > : ^^^^^ obj1["0o45436"]; // any ->obj1["0o45436"] : error +>obj1["0o45436"] : any +> : ^^^ >obj1 : { 19230: string; a: number; b: number; oct1: number; Infinity: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"0o45436" : "0o45436" @@ -167,7 +168,8 @@ obj2[0O45436]; // string > : ^^^^^ obj2["0O45436"]; // any ->obj2["0O45436"] : error +>obj2["0O45436"] : any +> : ^^^ >obj2 : { 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"0O45436" : "0O45436" @@ -230,7 +232,8 @@ obj2["5.462437423415177e+244"]; // boolean > : ^^^^^^^^^^^^^^^^^^^^^^^^ obj2["Infinity"]; // any ->obj2["Infinity"] : error +>obj2["Infinity"] : any +> : ^^^ >obj2 : { 19230: string; a: number; b: number; oct2: number; 5.462437423415177e+244: boolean; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"Infinity" : "Infinity" diff --git a/tests/baselines/reference/octalIntegerLiteralError.js b/tests/baselines/reference/octalIntegerLiteralError.js index 1102d4e41f876..fa5697271daee 100644 --- a/tests/baselines/reference/octalIntegerLiteralError.js +++ b/tests/baselines/reference/octalIntegerLiteralError.js @@ -13,6 +13,7 @@ var obj1 = { //// [octalIntegerLiteralError.js] +"use strict"; // error var oct1 = 5852; 823; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.js b/tests/baselines/reference/stringLiteralTypesOverloads04.js index 87262594fdcf4..17be8ea0b8d84 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads04.js +++ b/tests/baselines/reference/stringLiteralTypesOverloads04.js @@ -1,7 +1,7 @@ //// [tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts] //// //// [stringLiteralTypesOverloads04.ts] -declare function f(x: (p: "foo" | "bar") => "foo"); +declare function f(x: (p: "foo" | "bar") => "foo"): void; f(y => { const z = y = "foo"; @@ -16,4 +16,4 @@ f(function (y) { //// [stringLiteralTypesOverloads04.d.ts] -declare function f(x: (p: "foo" | "bar") => "foo"): any; +declare function f(x: (p: "foo" | "bar") => "foo"): void; diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.symbols b/tests/baselines/reference/stringLiteralTypesOverloads04.symbols index c1bc5a29d964c..0c41657378768 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads04.symbols +++ b/tests/baselines/reference/stringLiteralTypesOverloads04.symbols @@ -1,7 +1,7 @@ //// [tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts] //// === stringLiteralTypesOverloads04.ts === -declare function f(x: (p: "foo" | "bar") => "foo"); +declare function f(x: (p: "foo" | "bar") => "foo"): void; >f : Symbol(f, Decl(stringLiteralTypesOverloads04.ts, 0, 0)) >x : Symbol(x, Decl(stringLiteralTypesOverloads04.ts, 0, 19)) >p : Symbol(p, Decl(stringLiteralTypesOverloads04.ts, 0, 23)) diff --git a/tests/baselines/reference/stringLiteralTypesOverloads04.types b/tests/baselines/reference/stringLiteralTypesOverloads04.types index 7abae42417a86..658f4d0e1d06f 100644 --- a/tests/baselines/reference/stringLiteralTypesOverloads04.types +++ b/tests/baselines/reference/stringLiteralTypesOverloads04.types @@ -1,18 +1,19 @@ //// [tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts] //// === stringLiteralTypesOverloads04.ts === -declare function f(x: (p: "foo" | "bar") => "foo"); ->f : (x: (p: "foo" | "bar") => "foo") => any -> : ^ ^^ ^^^^^^^^ +declare function f(x: (p: "foo" | "bar") => "foo"): void; +>f : (x: (p: "foo" | "bar") => "foo") => void +> : ^ ^^ ^^^^^ >x : (p: "foo" | "bar") => "foo" > : ^ ^^ ^^^^^ >p : "foo" | "bar" > : ^^^^^^^^^^^^^ f(y => { ->f(y => { const z = y = "foo"; return z;}) : any ->f : (x: (p: "foo" | "bar") => "foo") => any -> : ^ ^^ ^^^^^^^^ +>f(y => { const z = y = "foo"; return z;}) : void +> : ^^^^ +>f : (x: (p: "foo" | "bar") => "foo") => void +> : ^ ^^ ^^^^^ >y => { const z = y = "foo"; return z;} : (y: "foo" | "bar") => "foo" > : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^ >y : "foo" | "bar" diff --git a/tests/baselines/reference/typedArrays.js b/tests/baselines/reference/typedArrays.js index f4212d10ff6ef..24cbf7bc9b80f 100644 --- a/tests/baselines/reference/typedArrays.js +++ b/tests/baselines/reference/typedArrays.js @@ -76,7 +76,7 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { return typedArrays; } -function CreateTypedArraysOf(obj) { +function CreateTypedArraysOf(obj: any) { var typedArrays = []; typedArrays[0] = Int8Array.of(...obj); typedArrays[1] = Uint8Array.of(...obj); diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index ea657ae421a53..1ad80df1e35c4 100644 --- a/tests/baselines/reference/typedArrays.symbols +++ b/tests/baselines/reference/typedArrays.symbols @@ -308,7 +308,7 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 61, 7)) } -function CreateTypedArraysOf(obj) { +function CreateTypedArraysOf(obj: any) { >CreateTypedArraysOf : Symbol(CreateTypedArraysOf, Decl(typedArrays.ts, 73, 1)) >obj : Symbol(obj, Decl(typedArrays.ts, 75, 29)) diff --git a/tests/baselines/reference/typedArrays.types b/tests/baselines/reference/typedArrays.types index f80b946d8e8c9..86663a4bd38b8 100644 --- a/tests/baselines/reference/typedArrays.types +++ b/tests/baselines/reference/typedArrays.types @@ -795,9 +795,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { > : ^^^^^ } -function CreateTypedArraysOf(obj) { +function CreateTypedArraysOf(obj: any) { >CreateTypedArraysOf : (obj: any) => any[] -> : ^ ^^^^^^^^^^^^^^^ +> : ^ ^^ ^^^^^^^^^^ >obj : any var typedArrays = []; diff --git a/tests/baselines/reference/unionTypeIndexSignature.errors.txt b/tests/baselines/reference/unionTypeIndexSignature.errors.txt new file mode 100644 index 0000000000000..4d77b3b3063ee --- /dev/null +++ b/tests/baselines/reference/unionTypeIndexSignature.errors.txt @@ -0,0 +1,73 @@ +unionTypeIndexSignature.ts(8,13): error TS2454: Variable 'unionOfDifferentReturnType' is used before being assigned. +unionTypeIndexSignature.ts(9,13): error TS2454: Variable 'unionOfDifferentReturnType' is used before being assigned. +unionTypeIndexSignature.ts(12,10): error TS2454: Variable 'unionOfTypesWithAndWithoutStringSignature' is used before being assigned. +unionTypeIndexSignature.ts(12,10): error TS7053: Element implicitly has an 'any' type because expression of type '"hello"' can't be used to index type 'boolean | { [a: string]: number; }'. + Property 'hello' does not exist on type 'boolean | { [a: string]: number; }'. +unionTypeIndexSignature.ts(13,10): error TS2454: Variable 'unionOfTypesWithAndWithoutStringSignature' is used before being assigned. +unionTypeIndexSignature.ts(13,10): error TS7053: Element implicitly has an 'any' type because expression of type '10' can't be used to index type 'boolean | { [a: string]: number; }'. + Property '10' does not exist on type 'boolean | { [a: string]: number; }'. +unionTypeIndexSignature.ts(18,13): error TS2454: Variable 'unionOfDifferentReturnType1' is used before being assigned. +unionTypeIndexSignature.ts(18,41): error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'. +unionTypeIndexSignature.ts(19,13): error TS2454: Variable 'unionOfDifferentReturnType1' is used before being assigned. +unionTypeIndexSignature.ts(22,10): error TS2454: Variable 'unionOfTypesWithAndWithoutStringSignature1' is used before being assigned. +unionTypeIndexSignature.ts(22,10): error TS7053: Element implicitly has an 'any' type because expression of type '"hello"' can't be used to index type 'boolean | { [a: number]: number; }'. + Property 'hello' does not exist on type 'boolean | { [a: number]: number; }'. +unionTypeIndexSignature.ts(23,10): error TS2454: Variable 'unionOfTypesWithAndWithoutStringSignature1' is used before being assigned. +unionTypeIndexSignature.ts(23,10): error TS7053: Element implicitly has an 'any' type because expression of type '10' can't be used to index type 'boolean | { [a: number]: number; }'. + Property '10' does not exist on type 'boolean | { [a: number]: number; }'. + + +==== unionTypeIndexSignature.ts (13 errors) ==== + var numOrDate: number | Date; + var anyVar: number; + + // If each type in U has a string index signature, + // U has a string index signature of a union type of the types of the string index signatures from each type in U. + + var unionOfDifferentReturnType: { [a: string]: number; } | { [a: string]: Date; }; + numOrDate = unionOfDifferentReturnType["hello"]; // number | Date + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2454: Variable 'unionOfDifferentReturnType' is used before being assigned. + numOrDate = unionOfDifferentReturnType[10]; // number | Date + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2454: Variable 'unionOfDifferentReturnType' is used before being assigned. + + var unionOfTypesWithAndWithoutStringSignature: { [a: string]: number; } | boolean; + anyVar = unionOfTypesWithAndWithoutStringSignature["hello"]; // any + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2454: Variable 'unionOfTypesWithAndWithoutStringSignature' is used before being assigned. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"hello"' can't be used to index type 'boolean | { [a: string]: number; }'. +!!! error TS7053: Property 'hello' does not exist on type 'boolean | { [a: string]: number; }'. + anyVar = unionOfTypesWithAndWithoutStringSignature[10]; // any + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2454: Variable 'unionOfTypesWithAndWithoutStringSignature' is used before being assigned. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '10' can't be used to index type 'boolean | { [a: string]: number; }'. +!!! error TS7053: Property '10' does not exist on type 'boolean | { [a: string]: number; }'. + + // If each type in U has a numeric index signature, + // U has a numeric index signature of a union type of the types of the numeric index signatures from each type in U. + var unionOfDifferentReturnType1: { [a: number]: number; } | { [a: number]: Date; }; + numOrDate = unionOfDifferentReturnType1["hello"]; // any + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2454: Variable 'unionOfDifferentReturnType1' is used before being assigned. + ~~~~~~~ +!!! error TS7015: Element implicitly has an 'any' type because index expression is not of type 'number'. + numOrDate = unionOfDifferentReturnType1[10]; // number | Date + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2454: Variable 'unionOfDifferentReturnType1' is used before being assigned. + + var unionOfTypesWithAndWithoutStringSignature1: { [a: number]: number; } | boolean; + anyVar = unionOfTypesWithAndWithoutStringSignature1["hello"]; // any + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2454: Variable 'unionOfTypesWithAndWithoutStringSignature1' is used before being assigned. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '"hello"' can't be used to index type 'boolean | { [a: number]: number; }'. +!!! error TS7053: Property 'hello' does not exist on type 'boolean | { [a: number]: number; }'. + anyVar = unionOfTypesWithAndWithoutStringSignature1[10]; // any + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2454: Variable 'unionOfTypesWithAndWithoutStringSignature1' is used before being assigned. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS7053: Element implicitly has an 'any' type because expression of type '10' can't be used to index type 'boolean | { [a: number]: number; }'. +!!! error TS7053: Property '10' does not exist on type 'boolean | { [a: number]: number; }'. \ No newline at end of file diff --git a/tests/baselines/reference/unionTypeIndexSignature.js b/tests/baselines/reference/unionTypeIndexSignature.js index 4129f23e0cac9..9fac590f12bcb 100644 --- a/tests/baselines/reference/unionTypeIndexSignature.js +++ b/tests/baselines/reference/unionTypeIndexSignature.js @@ -26,6 +26,7 @@ anyVar = unionOfTypesWithAndWithoutStringSignature1["hello"]; // any anyVar = unionOfTypesWithAndWithoutStringSignature1[10]; // any //// [unionTypeIndexSignature.js] +"use strict"; var numOrDate; var anyVar; // If each type in U has a string index signature, diff --git a/tests/baselines/reference/unionTypeIndexSignature.types b/tests/baselines/reference/unionTypeIndexSignature.types index 2cf66dc0d40a4..44fd614126ea3 100644 --- a/tests/baselines/reference/unionTypeIndexSignature.types +++ b/tests/baselines/reference/unionTypeIndexSignature.types @@ -51,20 +51,24 @@ var unionOfTypesWithAndWithoutStringSignature: { [a: string]: number; } | boolea > : ^^^^^^ anyVar = unionOfTypesWithAndWithoutStringSignature["hello"]; // any ->anyVar = unionOfTypesWithAndWithoutStringSignature["hello"] : error +>anyVar = unionOfTypesWithAndWithoutStringSignature["hello"] : any +> : ^^^ >anyVar : number > : ^^^^^^ ->unionOfTypesWithAndWithoutStringSignature["hello"] : error +>unionOfTypesWithAndWithoutStringSignature["hello"] : any +> : ^^^ >unionOfTypesWithAndWithoutStringSignature : boolean | { [a: string]: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"hello" : "hello" > : ^^^^^^^ anyVar = unionOfTypesWithAndWithoutStringSignature[10]; // any ->anyVar = unionOfTypesWithAndWithoutStringSignature[10] : error +>anyVar = unionOfTypesWithAndWithoutStringSignature[10] : any +> : ^^^ >anyVar : number > : ^^^^^^ ->unionOfTypesWithAndWithoutStringSignature[10] : error +>unionOfTypesWithAndWithoutStringSignature[10] : any +> : ^^^ >unionOfTypesWithAndWithoutStringSignature : boolean | { [a: string]: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >10 : 10 @@ -81,10 +85,12 @@ var unionOfDifferentReturnType1: { [a: number]: number; } | { [a: number]: Date; > : ^^^^^^ numOrDate = unionOfDifferentReturnType1["hello"]; // any ->numOrDate = unionOfDifferentReturnType1["hello"] : error +>numOrDate = unionOfDifferentReturnType1["hello"] : any +> : ^^^ >numOrDate : number | Date > : ^^^^^^^^^^^^^ ->unionOfDifferentReturnType1["hello"] : error +>unionOfDifferentReturnType1["hello"] : any +> : ^^^ >unionOfDifferentReturnType1 : { [a: number]: number; } | { [a: number]: Date; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"hello" : "hello" @@ -109,20 +115,24 @@ var unionOfTypesWithAndWithoutStringSignature1: { [a: number]: number; } | boole > : ^^^^^^ anyVar = unionOfTypesWithAndWithoutStringSignature1["hello"]; // any ->anyVar = unionOfTypesWithAndWithoutStringSignature1["hello"] : error +>anyVar = unionOfTypesWithAndWithoutStringSignature1["hello"] : any +> : ^^^ >anyVar : number > : ^^^^^^ ->unionOfTypesWithAndWithoutStringSignature1["hello"] : error +>unionOfTypesWithAndWithoutStringSignature1["hello"] : any +> : ^^^ >unionOfTypesWithAndWithoutStringSignature1 : boolean | { [a: number]: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >"hello" : "hello" > : ^^^^^^^ anyVar = unionOfTypesWithAndWithoutStringSignature1[10]; // any ->anyVar = unionOfTypesWithAndWithoutStringSignature1[10] : error +>anyVar = unionOfTypesWithAndWithoutStringSignature1[10] : any +> : ^^^ >anyVar : number > : ^^^^^^ ->unionOfTypesWithAndWithoutStringSignature1[10] : error +>unionOfTypesWithAndWithoutStringSignature1[10] : any +> : ^^^ >unionOfTypesWithAndWithoutStringSignature1 : boolean | { [a: number]: number; } > : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >10 : 10 diff --git a/tests/cases/compiler/ambientModules.ts b/tests/cases/compiler/ambientModules.ts index f53b50e2f3fbe..126fc741da713 100644 --- a/tests/cases/compiler/ambientModules.ts +++ b/tests/cases/compiler/ambientModules.ts @@ -1,2 +1,3 @@ -declare namespace Foo.Bar { export var foo; }; +// @strict: false +declare namespace Foo.Bar { export var foo; }; Foo.Bar.foo = 5; \ No newline at end of file diff --git a/tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts b/tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts index 99599bbb165ee..4131fcd744c1e 100644 --- a/tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts +++ b/tests/cases/compiler/autoAsiForStaticsInClassDeclaration.ts @@ -1,4 +1,5 @@ -class C { +// @strict: false +class C { static x static y } \ No newline at end of file diff --git a/tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts b/tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts index 2cdcb9ad3a810..947d9426b437f 100644 --- a/tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts +++ b/tests/cases/compiler/checkSuperCallBeforeThisAccessing6.ts @@ -1,4 +1,5 @@ -class Base { +// @strict: false +class Base { constructor(...arg) { } } diff --git a/tests/cases/compiler/commentLeadingCloseBrace.ts b/tests/cases/compiler/commentLeadingCloseBrace.ts index bdf7a604a9bcf..3bcee900e0195 100644 --- a/tests/cases/compiler/commentLeadingCloseBrace.ts +++ b/tests/cases/compiler/commentLeadingCloseBrace.ts @@ -1,4 +1,5 @@ -declare function commentedParameters(...args): any; +// @strict: false +declare function commentedParameters(...args): any; function ifelse() { if (commentedParameters(1, 2)) { diff --git a/tests/cases/compiler/commentOnParameter1.ts b/tests/cases/compiler/commentOnParameter1.ts index 6a17c90950cad..b78d8fbeeaaf8 100644 --- a/tests/cases/compiler/commentOnParameter1.ts +++ b/tests/cases/compiler/commentOnParameter1.ts @@ -1,4 +1,5 @@ -function commentedParameters( +// @strict: false +function commentedParameters( /* Parameter a */ a /* End of parameter a */ diff --git a/tests/cases/compiler/commentOnParameter2.ts b/tests/cases/compiler/commentOnParameter2.ts index 2722eab554b63..39cb1b8687453 100644 --- a/tests/cases/compiler/commentOnParameter2.ts +++ b/tests/cases/compiler/commentOnParameter2.ts @@ -1,4 +1,5 @@ -function commentedParameters( +// @strict: false +function commentedParameters( /* Parameter a */ a /* End of parameter a */ /* Parameter b */ diff --git a/tests/cases/compiler/commentOnParameter3.ts b/tests/cases/compiler/commentOnParameter3.ts index 57eda10f33890..2b85b0ee9497e 100644 --- a/tests/cases/compiler/commentOnParameter3.ts +++ b/tests/cases/compiler/commentOnParameter3.ts @@ -1,4 +1,5 @@ -function commentedParameters( +// @strict: false +function commentedParameters( a /* parameter a */, b /* parameter b */, /* extra comment */ diff --git a/tests/cases/compiler/commentsAfterCaseClauses1.ts b/tests/cases/compiler/commentsAfterCaseClauses1.ts index 8b494161584db..6cdb1e3194e73 100644 --- a/tests/cases/compiler/commentsAfterCaseClauses1.ts +++ b/tests/cases/compiler/commentsAfterCaseClauses1.ts @@ -1,4 +1,5 @@ -function getSecurity(level) { +// @strict: false +function getSecurity(level) { switch(level){ case 0: // Zero case 1: // one diff --git a/tests/cases/compiler/commentsAfterCaseClauses2.ts b/tests/cases/compiler/commentsAfterCaseClauses2.ts index 9c35b80894e1e..336dd2d0d582d 100644 --- a/tests/cases/compiler/commentsAfterCaseClauses2.ts +++ b/tests/cases/compiler/commentsAfterCaseClauses2.ts @@ -1,4 +1,5 @@ -function getSecurity(level) { +// @strict: false +function getSecurity(level) { switch(level){ case 0: // Zero case 1: // one diff --git a/tests/cases/compiler/commentsAfterCaseClauses3.ts b/tests/cases/compiler/commentsAfterCaseClauses3.ts index 894e743c2e714..ed53bcf03c411 100644 --- a/tests/cases/compiler/commentsAfterCaseClauses3.ts +++ b/tests/cases/compiler/commentsAfterCaseClauses3.ts @@ -1,4 +1,5 @@ -function getSecurity(level) { +// @strict: false +function getSecurity(level) { switch(level){ case 0: /*Zero*/ case 1: /*One*/ diff --git a/tests/cases/compiler/controlFlowCaching.ts b/tests/cases/compiler/controlFlowCaching.ts index 6510a89b06e0f..70a7b92304df5 100644 --- a/tests/cases/compiler/controlFlowCaching.ts +++ b/tests/cases/compiler/controlFlowCaching.ts @@ -1,3 +1,4 @@ +// @strict: false // @strictNullChecks: true // Repro for #8401 diff --git a/tests/cases/compiler/declarationEmitDestructuring5.ts b/tests/cases/compiler/declarationEmitDestructuring5.ts index a02a21b5a50f4..ca93bff34a9f4 100644 --- a/tests/cases/compiler/declarationEmitDestructuring5.ts +++ b/tests/cases/compiler/declarationEmitDestructuring5.ts @@ -1,4 +1,5 @@ -// @declaration: true +// @strict: false +// @declaration: true function baz([, z, , ]) { } function foo([, b, ]: [any, any]): void { } function bar([z, , , ]) { } diff --git a/tests/cases/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.ts b/tests/cases/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.ts index 020a29ba21997..7fd66e94b36fb 100644 --- a/tests/cases/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.ts +++ b/tests/cases/compiler/declarationEmitDestructuringOptionalBindingParametersInOverloads.ts @@ -1,4 +1,5 @@ -// @declaration: true +// @strict: false +// @declaration: true function foo([x, y, z] ?: [string, number, boolean]); function foo(...rest: any[]) { diff --git a/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts b/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts index 87006d3cc2971..94cd78f2b01e4 100644 --- a/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts +++ b/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNode.ts @@ -1,4 +1,5 @@ -// @removeComments: true +// @strict: false +// @removeComments: true class C { /*! remove pinned comment anywhere else */ diff --git a/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.ts b/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.ts index 27c5c5f6b7bc3..8c461f2588bb7 100644 --- a/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.ts +++ b/tests/cases/compiler/doNotEmitPinnedCommentOnNotEmittedNodets.ts @@ -1,4 +1,5 @@ -// @removeComments: true +// @strict: false +// @removeComments: true class C { /*! remove pinned comment anywhere else */ diff --git a/tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.ts b/tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.ts index 31c7face08dbd..912effa6792e2 100644 --- a/tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.ts +++ b/tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES5.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 (x) => ({ "1": "one", "2": "two" } as { [key: string]: string })[x]; (x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x; \ No newline at end of file diff --git a/tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.ts b/tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.ts index ae3fe8a3f0156..5d012bd26c5d0 100644 --- a/tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.ts +++ b/tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 (x) => ({ "1": "one", "2": "two" } as { [key: string]: string })[x]; (x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x; \ No newline at end of file diff --git a/tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts b/tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts index d5abc22e2e8b6..b0042d16f5867 100644 --- a/tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts +++ b/tests/cases/compiler/moduleMemberWithoutTypeAnnotation1.ts @@ -1,4 +1,5 @@ -namespace TypeScript.Parser { +// @strict: false +namespace TypeScript.Parser { class SyntaxCursor { public currentNode(): SyntaxNode { return null; diff --git a/tests/cases/compiler/noUncheckedIndexAccess.ts b/tests/cases/compiler/noUncheckedIndexAccess.ts index 826459036e593..db82d26a16ecf 100644 --- a/tests/cases/compiler/noUncheckedIndexAccess.ts +++ b/tests/cases/compiler/noUncheckedIndexAccess.ts @@ -1,4 +1,5 @@ //@noUncheckedIndexedAccess: true +//@strict: false //@strictNullChecks: true enum Meat { diff --git a/tests/cases/compiler/restParameterAssignmentCompatibility.ts b/tests/cases/compiler/restParameterAssignmentCompatibility.ts index d8b4e5b9aadee..449b02111daa5 100644 --- a/tests/cases/compiler/restParameterAssignmentCompatibility.ts +++ b/tests/cases/compiler/restParameterAssignmentCompatibility.ts @@ -1,4 +1,5 @@ -class T { +// @strict: false +class T { m(...p3) { } diff --git a/tests/cases/compiler/typedArrays.ts b/tests/cases/compiler/typedArrays.ts index 591b00aadc683..cef339e9495e8 100644 --- a/tests/cases/compiler/typedArrays.ts +++ b/tests/cases/compiler/typedArrays.ts @@ -75,7 +75,7 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { return typedArrays; } -function CreateTypedArraysOf(obj) { +function CreateTypedArraysOf(obj: any) { var typedArrays = []; typedArrays[0] = Int8Array.of(...obj); typedArrays[1] = Uint8Array.of(...obj); diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunction.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunction.ts index cace55c05fb24..3dbf0d508b21f 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunction.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunction.ts @@ -1,7 +1,7 @@ // @target:es5 var f1 = () => { } var f2 = (x: string, y: string) => { } -var f3 = (x: string, y: number, ...rest) => { } +var f3 = (x: string, y: number, ...rest: any[]) => { } var f4 = (x: string, y: number, z = 10) => { } function foo(func: () => boolean) { } foo(() => true); diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIs.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIs.ts index 1366fff90a15a..4c7a53d3466a7 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIs.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIs.ts @@ -1,4 +1,5 @@ -// @target:ES5 +// @strict: false +// @target:ES5 var arrow1 = a => { }; var arrow2 = (a) => { }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIsES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIsES6.ts index 01331ededf995..8af833f16a219 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIsES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionAsIsES6.ts @@ -1,4 +1,5 @@ -// @target:ES6 +// @strict: false +// @target:ES6 var arrow1 = a => { }; var arrow2 = (a) => { }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionES6.ts index 9dff987cd6469..40b378bce9623 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionES6.ts @@ -1,7 +1,7 @@ // @target:es6 var f1 = () => { } var f2 = (x: string, y: string) => { } -var f3 = (x: string, y: number, ...rest) => { } +var f3 = (x: string, y: number, ...rest: any[]) => { } var f4 = (x: string, y: number, z=10) => { } function foo(func: () => boolean) { } foo(() => true); diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturing.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturing.ts index e098874fc554c..889c4d3ac2c62 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturing.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturing.ts @@ -1,4 +1,5 @@ -// @target:es5 +// @strict: false +// @target:es5 var f1 = () => { this.age = 10 }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturingES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturingES6.ts index 64d816dc2c627..b11025eb83b5e 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturingES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionThisCapturingES6.ts @@ -1,4 +1,5 @@ -// @target:es6 +// @strict: false +// @target:es6 var f1 = () => { this.age = 10 }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01.ts index 762fd2a8e6461..4652e21a064fa 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 var a = () => { var arg = arguments[0]; // error } diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01_ES6.ts index fa92d48a4c0d8..cff1c83ec6d27 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments01_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 var a = () => { var arg = arguments[0]; // error } diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02.ts index 565c211724a41..d866d5ff8c743 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02.ts @@ -1,3 +1,4 @@ -// @target: es5 +// @strict: false +// @target: es5 var a = () => arguments; \ No newline at end of file diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02_ES6.ts index 5a466c5fcdaf5..866ef33b205e2 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments02_ES6.ts @@ -1,3 +1,4 @@ -// @target: es6 +// @strict: false +// @target: es6 var a = () => arguments; \ No newline at end of file diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts index d0de2a8e7c8c8..e4456b0358190 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 var arguments; var a = () => arguments; \ No newline at end of file diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts index 69b08adf7ae2f..328879f8c9687 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments03_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 var arguments; var a = () => arguments; \ No newline at end of file diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts index cba24887da73a..4c964d41bf0b1 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { var arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts index 14f6540c0918c..e068bc1435366 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments04_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { var arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts index e2adfeba0fec2..af5126e5fb53d 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f(arguments) { var a = () => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts index b256ed6cd5321..ac44e6f756a88 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments05_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f(arguments) { var a = () => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts index e235671a01a84..c23ed75a516b3 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f(arguments) { var a = () => () => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts index 6defc6ec4a335..1d5a7e280bf62 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments06_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f(arguments) { var a = () => () => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts index 07fa34a0731e3..621f927dea035 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f(arguments) { var a = (arguments) => () => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts index 889fc141021a1..e169ddbdc3e55 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments07_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f(arguments) { var a = (arguments) => () => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts index c53b8701fdc37..d7cee194c6f84 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f(arguments) { var a = () => (arguments) => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts index feae67a22bef5..ede6a656567d3 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments08_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f(arguments) { var a = () => (arguments) => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09.ts index 06e305f40485f..ae609b3024fa4 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f(_arguments) { var a = () => () => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09_ES6.ts index c1b2f3d5cda0b..5d40fadaed3c9 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments09_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f(_arguments) { var a = () => () => arguments; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10.ts index 9122bb746b26d..9e558fdf8fe1d 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { var _arguments = 10; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10_ES6.ts index d5e616d5d28fc..d83695abcca76 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments10_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { var _arguments = 10; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts index 37542b860f4ae..a3b4916744843 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f(arguments) { var _arguments = 10; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts index fb77b177b76d4..23258f0a92287 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments11_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f(arguments) { var _arguments = 10; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12.ts index 39c9994bbd19f..791a4ca5b067c 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 class C { f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12_ES6.ts index cdfed56ae227b..7c51e461d996f 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments12_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 class C { f(arguments) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts index 6f4c2fccf550c..48b6292902b8e 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { var _arguments = 10; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts index c23a2b105fcc8..a9fa39bf596aa 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments13_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { var _arguments = 10; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts index 0f7cee8ab97c9..3c2fe0ec0fd7b 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { if (Math.random()) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts index c8c9da2bb309b..be41f1ae6ae97 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments14_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { if (Math.random()) { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts index cc347f9d5128d..bed4227f14aa8 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { var arguments = "hello"; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts index 056a51b8c1cc4..af0d3eae46046 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments15_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { var arguments = "hello"; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts index dbfd2c26e8117..e5ed6e9038d25 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { var arguments = "hello"; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts index 982617928711d..e50a8745f487b 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments16_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { var arguments = "hello"; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts index 77cbb07ede79b..205f122519d9b 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { var { arguments } = { arguments: "hello" }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts index b27b6b4ba91f2..e55f0724d9b7c 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments17_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { var { arguments } = { arguments: "hello" }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18.ts index 3d769ed62358b..511c1c86b2f5b 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { var { arguments: args } = { arguments }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18_ES6.ts index 0ec65f36d3b99..f3ead6acef39d 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments18_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { var { arguments: args } = { arguments }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19.ts index a968ba28d9e9e..c36272e4c5bc5 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 function f() { function g() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts index 50ede7a8e4dd2..bff0fbf1ae47a 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function f() { function g() { diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIs.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIs.ts index 1366fff90a15a..4c7a53d3466a7 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIs.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIs.ts @@ -1,4 +1,5 @@ -// @target:ES5 +// @strict: false +// @target:ES5 var arrow1 = a => { }; var arrow2 = (a) => { }; diff --git a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIsES6.ts b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIsES6.ts index 01331ededf995..8af833f16a219 100644 --- a/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIsES6.ts +++ b/tests/cases/conformance/es6/arrowFunction/emitArrowFunctionsAsIsES6.ts @@ -1,4 +1,5 @@ -// @target:ES6 +// @strict: false +// @target:ES6 var arrow1 = a => { }; var arrow2 = (a) => { }; diff --git a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts index 7bf60787d5cf9..60ec487d5cfba 100644 --- a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts +++ b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteral.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: true +// @target: es5 var bin1 = 0b11010; var bin2 = 0B11010; var bin3 = 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111; diff --git a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts index cb299b52dfab8..491e9191e5ab9 100644 --- a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts +++ b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: true +// @target: es6 var bin1 = 0b11010; var bin2 = 0B11010; var bin3 = 0B11111111111111111111111111111111111111111111111101001010100000010111110001111111111; diff --git a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts index b889aac5d9c68..659ca5b9e0019 100644 --- a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts +++ b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/binaryIntegerLiteralError.ts @@ -1,4 +1,5 @@ -// error +// @strict: true +// error var bin1 = 0B1102110; var bin1 = 0b11023410; diff --git a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteral.ts b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteral.ts index bfca9f1e4632a..61b811aeb1de6 100644 --- a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteral.ts +++ b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteral.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: true +// @target: es5 var oct1 = 0o45436; var oct2 = 0O45436; var oct3 = 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777; diff --git a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralES6.ts b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralES6.ts index b25692939daf3..ee79a65c7b795 100644 --- a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralES6.ts +++ b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: true +// @target: es6 var oct1 = 0o45436; var oct2 = 0O45436; var oct3 = 0o7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777; diff --git a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralError.ts b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralError.ts index 06e7b5ddf3873..f0796a162a9e3 100644 --- a/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralError.ts +++ b/tests/cases/conformance/es6/binaryAndOctalIntegerLiteral/octalIntegerLiteralError.ts @@ -1,4 +1,5 @@ -// error +// @strict: true +// error var oct1 = 0O13334823; var oct2 = 0o34318592; diff --git a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts index e6c71b0674071..7f3d7b10bcfdf 100644 --- a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts +++ b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithConstructorInES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 class A { y: number; constructor(x: number) { diff --git a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts index 945b21010128d..b091f05d5636f 100644 --- a/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts +++ b/tests/cases/conformance/es6/classDeclaration/emitClassDeclarationWithTypeArgumentAndOverloadInES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @noImplicitAny: false +// @target: es6 class B { x: T; B: T; diff --git a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts index e5d63f2e930f8..7ba3119491ea3 100644 --- a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts +++ b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing1.ts @@ -1,4 +1,5 @@ -declare var Factory: any +// @noImplicitAny: false +declare var Factory: any class Base { constructor(c) { } diff --git a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts index 1b0a0d541e9b1..33c31a0701094 100644 --- a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts +++ b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing2.ts @@ -1,4 +1,5 @@ -class Base { +// @strict: false +class Base { constructor(c) { } } class D extends Base { diff --git a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts index 1782027758556..315143606ce4b 100644 --- a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts +++ b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing5.ts @@ -1,4 +1,5 @@ -class D extends null { +// @noImplicitAny: false +class D extends null { private _t; constructor() { this._t; // No error diff --git a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts index 5742cdab845a9..66bb702b289b8 100644 --- a/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts +++ b/tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing8.ts @@ -1,4 +1,5 @@ -class Base { +// @strict: false +class Base { constructor(c) { } } class D extends Base { diff --git a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunction.ts b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunction.ts index 12480939a3956..e29afbf96cd28 100644 --- a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunction.ts +++ b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunction.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @noImplicitAny: false +// @target: es5 function foo(x: string, y = 10) { } function baz(x: string, y = 5, ...rest) { } function bar(y = 10) { } diff --git a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionES6.ts b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionES6.ts index 00afc3065464b..37d5e3cec6547 100644 --- a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionES6.ts +++ b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionES6.ts @@ -1,4 +1,5 @@ -// @target:es6 +// @noImplicitAny: false +// @target:es6 function foo(x: string, y = 10) { } function baz(x: string, y = 5, ...rest) { } function bar(y = 10) { } diff --git a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpression.ts b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpression.ts index f8e10c0ae1436..118006713e4b4 100644 --- a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpression.ts +++ b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpression.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @noImplicitAny: false +// @target: es5 var lambda1 = (y = "hello") => { } var lambda2 = (x: number, y = "hello") => { } var lambda3 = (x: number, y = "hello", ...rest) => { } diff --git a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpressionES6.ts b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpressionES6.ts index aebed249a6538..7e22d95a8da09 100644 --- a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpressionES6.ts +++ b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionExpressionES6.ts @@ -1,4 +1,5 @@ -// @target:es6 +// @noImplicitAny: false +// @target:es6 var lambda1 = (y = "hello") => { } var lambda2 = (x: number, y = "hello") => { } var lambda3 = (x: number, y = "hello", ...rest) => { } diff --git a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts index 8e280894af0a4..e93d8764d493e 100644 --- a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts +++ b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionProperty.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @noImplicitAny: false +// @target: es5 var obj2 = { func1(y = 10, ...rest) { }, func2(x = "hello") { }, diff --git a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionPropertyES6.ts b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionPropertyES6.ts index cb1cfb785461e..0e46c8f32c41d 100644 --- a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionPropertyES6.ts +++ b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersFunctionPropertyES6.ts @@ -1,4 +1,5 @@ -// @target:es6 +// @noImplicitAny: false +// @target:es6 var obj2 = { func1(y = 10, ...rest) { }, func2(x = "hello") { }, diff --git a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethod.ts b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethod.ts index be4a563836f2a..368bbb481d034 100644 --- a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethod.ts +++ b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethod.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @noImplicitAny: false +// @target: es5 class C { constructor(t: boolean, z: string, x: number, y = "hello") { } diff --git a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethodES6.ts b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethodES6.ts index 886b2e9235b34..a79f62bc3c31d 100644 --- a/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethodES6.ts +++ b/tests/cases/conformance/es6/defaultParameters/emitDefaultParametersMethodES6.ts @@ -1,4 +1,5 @@ -// @target:es6 +// @noImplicitAny: false +// @target:es6 class C { constructor(t: boolean, z: string, x: number, y = "hello") { } diff --git a/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES5.ts b/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES5.ts index e25a11ba5b05f..4137ffa9369e0 100644 --- a/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES5.ts +++ b/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES5.ts @@ -1,4 +1,5 @@ -// In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left. +// @noImplicitAny: false +// In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left. // An expression of type S is considered assignable to an assignment target V if one of the following is true // V is an object assignment pattern and, for each assignment property P in V, diff --git a/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES6.ts b/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES6.ts index a99b48d75da21..fd45f577b0ad4 100644 --- a/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES6.ts +++ b/tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment1ES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @noImplicitAny: false +// @target: es6 // In a destructuring assignment expression, the type of the expression on the right must be assignable to the assignment target on the left. // An expression of type S is considered assignable to an assignment target V if one of the following is true diff --git a/tests/cases/conformance/es6/for-ofStatements/for-of56.ts b/tests/cases/conformance/es6/for-ofStatements/for-of56.ts index 3b73a5294251d..6687d61f2ea2d 100644 --- a/tests/cases/conformance/es6/for-ofStatements/for-of56.ts +++ b/tests/cases/conformance/es6/for-ofStatements/for-of56.ts @@ -1,2 +1,3 @@ -//@target: ES6 +// @strict: false +//@target: ES6 for (var let of []) {} \ No newline at end of file diff --git a/tests/cases/conformance/es6/restParameters/emitRestParametersFunction.ts b/tests/cases/conformance/es6/restParameters/emitRestParametersFunction.ts index ee170d2bcb94a..aa6694d51f779 100644 --- a/tests/cases/conformance/es6/restParameters/emitRestParametersFunction.ts +++ b/tests/cases/conformance/es6/restParameters/emitRestParametersFunction.ts @@ -1,3 +1,4 @@ -// @target: es5 +// @strict: false +// @target: es5 function bar(...rest) { } function foo(x: number, y: string, ...rest) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionES6.ts b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionES6.ts index 366905d764b9d..e803c9bc3375b 100644 --- a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionES6.ts +++ b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionES6.ts @@ -1,3 +1,4 @@ -// @target: es6 +// @strict: false +// @target: es6 function bar(...rest) { } function foo(x: number, y: string, ...rest) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpression.ts b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpression.ts index a9ddf83c81665..eaabb00e419de 100644 --- a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpression.ts +++ b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpression.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 var funcExp = (...rest) => { } var funcExp1 = (X: number, ...rest) => { } var funcExp2 = function (...rest) { } diff --git a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpressionES6.ts b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpressionES6.ts index 310dcfd15579b..3e8f74c838495 100644 --- a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpressionES6.ts +++ b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionExpressionES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 var funcExp = (...rest) => { } var funcExp1 = (X: number, ...rest) => { } var funcExp2 = function (...rest) { } diff --git a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionProperty.ts b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionProperty.ts index c8a8ed16e7bae..6a4385fe223b7 100644 --- a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionProperty.ts +++ b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionProperty.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 var obj: { func1: (...rest) => void } diff --git a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionPropertyES6.ts b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionPropertyES6.ts index 34bb0cae6b742..c0ec5416823ec 100644 --- a/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionPropertyES6.ts +++ b/tests/cases/conformance/es6/restParameters/emitRestParametersFunctionPropertyES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 var obj: { func1: (...rest) => void } diff --git a/tests/cases/conformance/es6/restParameters/emitRestParametersMethod.ts b/tests/cases/conformance/es6/restParameters/emitRestParametersMethod.ts index 6b9e70fd196b9..0ce41c907796d 100644 --- a/tests/cases/conformance/es6/restParameters/emitRestParametersMethod.ts +++ b/tests/cases/conformance/es6/restParameters/emitRestParametersMethod.ts @@ -1,4 +1,5 @@ -// @target: es5 +// @strict: false +// @target: es5 class C { constructor(name: string, ...rest) { } diff --git a/tests/cases/conformance/es6/restParameters/emitRestParametersMethodES6.ts b/tests/cases/conformance/es6/restParameters/emitRestParametersMethodES6.ts index df2f2293c7598..af406411fba3c 100644 --- a/tests/cases/conformance/es6/restParameters/emitRestParametersMethodES6.ts +++ b/tests/cases/conformance/es6/restParameters/emitRestParametersMethodES6.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 class C { constructor(name: string, ...rest) { } diff --git a/tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts b/tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts index 066fc1c74b120..118a0b96b4950 100644 --- a/tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts +++ b/tests/cases/conformance/es6/templates/templateStringInArrowFunctionES6.ts @@ -1,2 +1,3 @@ -// @target: ES6 +// @strict: false +// @target: ES6 var x = x => `abc${ x }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts b/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts index a99643e6948f8..c374145c4721b 100644 --- a/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts +++ b/tests/cases/conformance/es6/templates/templateStringInYieldKeyword.ts @@ -1,4 +1,5 @@ -// @target: es6 +// @strict: false +// @target: es6 function* gen() { // Once this is supported, the inner expression does not need to be parenthesized. var x = yield `abc${ x }def`; diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts index 946bd41470fb5..ee94308b443ef 100644 --- a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedArrowFunctionES6.ts @@ -1,2 +1,3 @@ -// @target: ES6 +// @strict: false +// @target: ES6 var x = `abc${ x => x }def`; \ No newline at end of file diff --git a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts index 5a7409aef79c8..8ed4c35d56008 100644 --- a/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts +++ b/tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeywordES6.ts @@ -1,4 +1,5 @@ -// @target: ES6 +// @strict: false +// @target: ES6 function* gen() { // Once this is supported, yield *must* be parenthesized. var x = `abc${ yield 10 }def`; diff --git a/tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts b/tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts index 34c77288f3f48..369940b98ef2c 100644 --- a/tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts +++ b/tests/cases/conformance/expressions/arrayLiterals/arrayLiterals2ES5.ts @@ -1,4 +1,5 @@ -// ElementList: ( Modified ) +// @strict: false +// ElementList: ( Modified ) // Elisionopt AssignmentExpression // Elisionopt SpreadElement // ElementList, Elisionopt AssignmentExpression diff --git a/tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping1.ts b/tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping1.ts index ea8e60cb5b922..b1fe36611dd58 100644 --- a/tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping1.ts +++ b/tests/cases/conformance/expressions/contextualTyping/functionExpressionContextualTyping1.ts @@ -1,4 +1,5 @@ -// When a function expression with no type parameters and no parameter type annotations +// @strict: false +// When a function expression with no type parameters and no parameter type annotations // is contextually typed (section 4.19) by a type T and a contextual signature S can be extracted from T enum E { red, blue } diff --git a/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator1.ts b/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator1.ts index d008e7f7abc19..271d633b2c7ae 100644 --- a/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator1.ts +++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator1.ts @@ -1,4 +1,5 @@ -function f1() { +// @strict: false +function f1() { var a, b, c; if (a < b || b > (c + 1)) { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator2.ts b/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator2.ts index ed2fb80fef064..0b24614a98ac1 100644 --- a/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator2.ts +++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator2.ts @@ -1,4 +1,5 @@ -function f() { +// @strict: false +function f() { var a, b, c; if (a < b && b > (c + 1)) { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator3.ts b/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator3.ts index 25bc7e0c95d75..29d041dfb3d3f 100644 --- a/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator3.ts +++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserAmbiguityWithBinaryOperator3.ts @@ -1,4 +1,5 @@ -function f() { +// @strict: false +function f() { var a, b, c; if (a < b && b < (c + 1)) { } } diff --git a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts index 58317a95fab91..e47ce8c8296f2 100644 --- a/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts +++ b/tests/cases/conformance/types/stringLiteral/stringLiteralTypesOverloads04.ts @@ -1,6 +1,6 @@ // @declaration: true -declare function f(x: (p: "foo" | "bar") => "foo"); +declare function f(x: (p: "foo" | "bar") => "foo"): void; f(y => { const z = y = "foo"; diff --git a/tests/cases/conformance/types/union/contextualTypeWithUnionTypeCallSignatures.ts b/tests/cases/conformance/types/union/contextualTypeWithUnionTypeCallSignatures.ts index fccf538101736..e73819442bfb7 100644 --- a/tests/cases/conformance/types/union/contextualTypeWithUnionTypeCallSignatures.ts +++ b/tests/cases/conformance/types/union/contextualTypeWithUnionTypeCallSignatures.ts @@ -1,4 +1,6 @@ -//When used as a contextual type, a union type U has those members that are present in any of +// @strict: true + +// When used as a contextual type, a union type U has those members that are present in any of // its constituent types, with types that are unions of the respective members in the constituent types. // Let S be the set of types in U that have call signatures. diff --git a/tests/cases/conformance/types/union/unionTypeIndexSignature.ts b/tests/cases/conformance/types/union/unionTypeIndexSignature.ts index 698da7449f49b..cc499c24427ad 100644 --- a/tests/cases/conformance/types/union/unionTypeIndexSignature.ts +++ b/tests/cases/conformance/types/union/unionTypeIndexSignature.ts @@ -1,4 +1,5 @@ -var numOrDate: number | Date; +// @strict: true +var numOrDate: number | Date; var anyVar: number; // If each type in U has a string index signature, diff --git a/tests/cases/fourslash/annotateWithTypeFromJSDoc5.ts b/tests/cases/fourslash/annotateWithTypeFromJSDoc5.ts index 5061072ac0b9b..205897a8fb6e3 100644 --- a/tests/cases/fourslash/annotateWithTypeFromJSDoc5.ts +++ b/tests/cases/fourslash/annotateWithTypeFromJSDoc5.ts @@ -1,5 +1,6 @@ /// +// @strict: false ////class C { //// /** @type {number | null} */ //// p = null diff --git a/tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts b/tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts index 76e2db2fa008c..78d06459f2729 100644 --- a/tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts +++ b/tests/cases/fourslash/insertReturnStatementInDuplicateIdentifierFunction.ts @@ -1,5 +1,6 @@ /// +// @strict: true //// class foo { }; //// function foo() { /**/ } diff --git a/tests/cases/fourslash/jsDocFunctionSignatures5.ts b/tests/cases/fourslash/jsDocFunctionSignatures5.ts index 61b7b381be042..0fa54b5c771b0 100644 --- a/tests/cases/fourslash/jsDocFunctionSignatures5.ts +++ b/tests/cases/fourslash/jsDocFunctionSignatures5.ts @@ -1,4 +1,5 @@ /// +// @strict: true // @allowJs: true // @Filename: Foo.js diff --git a/tests/cases/fourslash/jsDocTypeTagQuickInfo1.ts b/tests/cases/fourslash/jsDocTypeTagQuickInfo1.ts index 240c00e228384..a5834fdabb933 100644 --- a/tests/cases/fourslash/jsDocTypeTagQuickInfo1.ts +++ b/tests/cases/fourslash/jsDocTypeTagQuickInfo1.ts @@ -1,4 +1,5 @@ /// +// @strict: true // @allowJs: true // @Filename: jsDocTypeTag1.js //// /** @type {String} */ diff --git a/tests/cases/fourslash/jsDocTypeTagQuickInfo2.ts b/tests/cases/fourslash/jsDocTypeTagQuickInfo2.ts index 7c79116b04199..f9958df54940a 100644 --- a/tests/cases/fourslash/jsDocTypeTagQuickInfo2.ts +++ b/tests/cases/fourslash/jsDocTypeTagQuickInfo2.ts @@ -1,4 +1,5 @@ /// +// @strict: true // @allowJs: true // @Filename: jsDocTypeTag2.js //// /** @type {string} */