Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck11.errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ES5For-ofTypeCheck11.ts(3,6): error TS2322: Type 'string | number' is not assign


==== ES5For-ofTypeCheck11.ts (1 errors) ====
var union: string | number[];
declare var union: string | number[];
var v: string;
for (v of union) { }
~
Expand Down
3 changes: 1 addition & 2 deletions tests/baselines/reference/ES5For-ofTypeCheck11.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] ////

//// [ES5For-ofTypeCheck11.ts]
var union: string | number[];
declare var union: string | number[];
var v: string;
for (v of union) { }

//// [ES5For-ofTypeCheck11.js]
var union;
var v;
for (var _i = 0, union_1 = union; _i < union_1.length; _i++) {
v = union_1[_i];
Expand Down
6 changes: 3 additions & 3 deletions tests/baselines/reference/ES5For-ofTypeCheck11.symbols
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] ////

=== ES5For-ofTypeCheck11.ts ===
var union: string | number[];
>union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 3))
declare var union: string | number[];
>union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 11))

var v: string;
>v : Symbol(v, Decl(ES5For-ofTypeCheck11.ts, 1, 3))

for (v of union) { }
>v : Symbol(v, Decl(ES5For-ofTypeCheck11.ts, 1, 3))
>union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 3))
>union : Symbol(union, Decl(ES5For-ofTypeCheck11.ts, 0, 11))

2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck11.types
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck11.ts] ////

=== ES5For-ofTypeCheck11.ts ===
var union: string | number[];
declare var union: string | number[];
>union : string | number[]
> : ^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck14.errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ES5For-ofTypeCheck14.ts(2,17): error TS2802: Type 'Set<number>' can only be iter


==== ES5For-ofTypeCheck14.ts (1 errors) ====
var union: string | Set<number>
declare var union: string | Set<number>
for (const e of union) { }
~~~~~
!!! error TS2802: Type 'Set<number>' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
3 changes: 1 addition & 2 deletions tests/baselines/reference/ES5For-ofTypeCheck14.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] ////

//// [ES5For-ofTypeCheck14.ts]
var union: string | Set<number>
declare var union: string | Set<number>
for (const e of union) { }

//// [ES5For-ofTypeCheck14.js]
var union;
for (var _i = 0, union_1 = union; _i < union_1.length; _i++) {
var e = union_1[_i];
}
6 changes: 3 additions & 3 deletions tests/baselines/reference/ES5For-ofTypeCheck14.symbols
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] ////

=== ES5For-ofTypeCheck14.ts ===
var union: string | Set<number>
>union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 3))
declare var union: string | Set<number>
>union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 11))
>Set : Symbol(Set, Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.collection.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))

for (const e of union) { }
>e : Symbol(e, Decl(ES5For-ofTypeCheck14.ts, 1, 10))
>union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 3))
>union : Symbol(union, Decl(ES5For-ofTypeCheck14.ts, 0, 11))

2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck14.types
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck14.ts] ////

=== ES5For-ofTypeCheck14.ts ===
var union: string | Set<number>
declare var union: string | Set<number>
>union : string | Set<number>
> : ^^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck7.errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ES5For-ofTypeCheck7.ts(2,15): error TS2461: Type 'number' is not an array type.


==== ES5For-ofTypeCheck7.ts (1 errors) ====
var union: string | number;
declare var union: string | number;
for (var v of union) { }
~~~~~
!!! error TS2461: Type 'number' is not an array type.
3 changes: 1 addition & 2 deletions tests/baselines/reference/ES5For-ofTypeCheck7.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] ////

//// [ES5For-ofTypeCheck7.ts]
var union: string | number;
declare var union: string | number;
for (var v of union) { }

//// [ES5For-ofTypeCheck7.js]
var union;
for (var _i = 0, union_1 = union; _i < union_1.length; _i++) {
var v = union_1[_i];
}
6 changes: 3 additions & 3 deletions tests/baselines/reference/ES5For-ofTypeCheck7.symbols
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] ////

=== ES5For-ofTypeCheck7.ts ===
var union: string | number;
>union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 3))
declare var union: string | number;
>union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 11))

for (var v of union) { }
>v : Symbol(v, Decl(ES5For-ofTypeCheck7.ts, 1, 8))
>union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 3))
>union : Symbol(union, Decl(ES5For-ofTypeCheck7.ts, 0, 11))

2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck7.types
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck7.ts] ////

=== ES5For-ofTypeCheck7.ts ===
var union: string | number;
declare var union: string | number;
>union : string | number
> : ^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck8.errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ES5For-ofTypeCheck8.ts(3,6): error TS2322: Type 'string | number | symbol' is no


==== ES5For-ofTypeCheck8.ts (1 errors) ====
var union: string | string[]| number[]| symbol[];
declare var union: string | string[]| number[]| symbol[];
var v: symbol;
for (v of union) { }
~
Expand Down
3 changes: 1 addition & 2 deletions tests/baselines/reference/ES5For-ofTypeCheck8.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] ////

//// [ES5For-ofTypeCheck8.ts]
var union: string | string[]| number[]| symbol[];
declare var union: string | string[]| number[]| symbol[];
var v: symbol;
for (v of union) { }

//// [ES5For-ofTypeCheck8.js]
var union;
var v;
for (var _i = 0, union_1 = union; _i < union_1.length; _i++) {
v = union_1[_i];
Expand Down
6 changes: 3 additions & 3 deletions tests/baselines/reference/ES5For-ofTypeCheck8.symbols
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] ////

=== ES5For-ofTypeCheck8.ts ===
var union: string | string[]| number[]| symbol[];
>union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 3))
declare var union: string | string[]| number[]| symbol[];
>union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 11))

var v: symbol;
>v : Symbol(v, Decl(ES5For-ofTypeCheck8.ts, 1, 3))

for (v of union) { }
>v : Symbol(v, Decl(ES5For-ofTypeCheck8.ts, 1, 3))
>union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 3))
>union : Symbol(union, Decl(ES5For-ofTypeCheck8.ts, 0, 11))

2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck8.types
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck8.ts] ////

=== ES5For-ofTypeCheck8.ts ===
var union: string | string[]| number[]| symbol[];
declare var union: string | string[]| number[]| symbol[];
>union : string | string[] | number[] | symbol[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck9.errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ES5For-ofTypeCheck9.ts(2,15): error TS2461: Type 'number | symbol | string[]' is


==== ES5For-ofTypeCheck9.ts (1 errors) ====
var union: string | string[] | number | symbol;
declare var union: string | string[] | number | symbol;
for (let v of union) { }
~~~~~
!!! error TS2461: Type 'number | symbol | string[]' is not an array type.
3 changes: 1 addition & 2 deletions tests/baselines/reference/ES5For-ofTypeCheck9.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] ////

//// [ES5For-ofTypeCheck9.ts]
var union: string | string[] | number | symbol;
declare var union: string | string[] | number | symbol;
for (let v of union) { }

//// [ES5For-ofTypeCheck9.js]
var union;
for (var _i = 0, union_1 = union; _i < union_1.length; _i++) {
var v = union_1[_i];
}
6 changes: 3 additions & 3 deletions tests/baselines/reference/ES5For-ofTypeCheck9.symbols
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] ////

=== ES5For-ofTypeCheck9.ts ===
var union: string | string[] | number | symbol;
>union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 3))
declare var union: string | string[] | number | symbol;
>union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 11))

for (let v of union) { }
>v : Symbol(v, Decl(ES5For-ofTypeCheck9.ts, 1, 8))
>union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 3))
>union : Symbol(union, Decl(ES5For-ofTypeCheck9.ts, 0, 11))

2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5For-ofTypeCheck9.types
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck9.ts] ////

=== ES5For-ofTypeCheck9.ts ===
var union: string | string[] | number | symbol;
declare var union: string | string[] | number | symbol;
>union : string | number | symbol | string[]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
6 changes: 3 additions & 3 deletions tests/baselines/reference/ES5SymbolProperty5.errors.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ES5SymbolProperty5.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: symbol; }'.
ES5SymbolProperty5.ts(1,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: symbol; }'.
ES5SymbolProperty5.ts(7,26): error TS2554: Expected 0 arguments, but got 1.


==== ES5SymbolProperty5.ts (2 errors) ====
var Symbol: { iterator: symbol };
~~~~~~
declare var Symbol: { iterator: symbol };
~~~~~~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type '{ iterator: symbol; }'.
!!! related TS6203 lib.es2015.symbol.d.ts:--:--: 'Symbol' was also declared here.

Expand Down
3 changes: 1 addition & 2 deletions tests/baselines/reference/ES5SymbolProperty5.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] ////

//// [ES5SymbolProperty5.ts]
var Symbol: { iterator: symbol };
declare var Symbol: { iterator: symbol };

class C {
[Symbol.iterator]() { }
Expand All @@ -10,7 +10,6 @@ class C {
(new C)[Symbol.iterator](0) // Should error

//// [ES5SymbolProperty5.js]
var Symbol;
var C = /** @class */ (function () {
function C() {
}
Expand Down
14 changes: 7 additions & 7 deletions tests/baselines/reference/ES5SymbolProperty5.symbols
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] ////

=== ES5SymbolProperty5.ts ===
var Symbol: { iterator: symbol };
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
>iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 13))
declare var Symbol: { iterator: symbol };
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 11))
>iterator : Symbol(iterator, Decl(ES5SymbolProperty5.ts, 0, 21))

class C {
>C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 33))
>C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 41))

[Symbol.iterator]() { }
>[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty5.ts, 2, 9))
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 11))
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
}

(new C)[Symbol.iterator](0) // Should error
>C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 33))
>C : Symbol(C, Decl(ES5SymbolProperty5.ts, 0, 41))
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 3))
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty5.ts, 0, 11))
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))

2 changes: 1 addition & 1 deletion tests/baselines/reference/ES5SymbolProperty5.types
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] ////

=== ES5SymbolProperty5.ts ===
var Symbol: { iterator: symbol };
declare var Symbol: { iterator: symbol };
>Symbol : SymbolConstructor
> : ^^^^^^^^^^^^^^^^^
>iterator : symbol
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ additionOperatorWithInvalidOperands.ts(40,11): error TS2365: Operator '+' cannot
enum E { a, b, c }
namespace M { export var a }

var a: boolean;
var b: number;
var c: Object;
var d: Number;
declare var a: boolean;
declare var b: number;
declare var c: Object;
declare var d: Number;

// boolean + every type except any and string
var r1 = a + a;
Expand Down
12 changes: 4 additions & 8 deletions tests/baselines/reference/additionOperatorWithInvalidOperands.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ class C {
enum E { a, b, c }
namespace M { export var a }

var a: boolean;
var b: number;
var c: Object;
var d: Number;
declare var a: boolean;
declare var b: number;
declare var c: Object;
declare var d: Number;

// boolean + every type except any and string
var r1 = a + a;
Expand Down Expand Up @@ -59,10 +59,6 @@ var E;
var M;
(function (M) {
})(M || (M = {}));
var a;
var b;
var c;
var d;
// boolean + every type except any and string
var r1 = a + a;
var r2 = a + b;
Expand Down
Loading
Loading