Skip to content

Commit 7c3f618

Browse files
committed
Accept baselines
1 parent 93e344b commit 7c3f618

File tree

1,055 files changed

+35215
-6163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,055 files changed

+35215
-6163
lines changed
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
2-
ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'MyStringIterator' is not an array type or a string type.
1+
ES5For-ofTypeCheck10.ts(14,15): error TS2802: Type 'MyStringIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.
32

43

5-
==== ES5For-ofTypeCheck10.ts (2 errors) ====
4+
==== ES5For-ofTypeCheck10.ts (1 errors) ====
65
// In ES3/5, you cannot for...of over an arbitrary iterable.
76
class MyStringIterator {
87
next() {
@@ -12,12 +11,10 @@ ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'MyStringIterator' is not an
1211
};
1312
}
1413
[Symbol.iterator]() {
15-
~~~~~~
16-
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
1714
return this;
1815
}
1916
}
2017

2118
for (var v of new MyStringIterator) { }
2219
~~~~~~~~~~~~~~~~~~~~
23-
!!! error TS2495: Type 'MyStringIterator' is not an array type or a string type.
20+
!!! error TS2802: Type 'MyStringIterator' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher.

tests/baselines/reference/ES5For-ofTypeCheck10.symbols

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ class MyStringIterator {
1919
}
2020
[Symbol.iterator]() {
2121
>[Symbol.iterator] : Symbol(MyStringIterator[Symbol.iterator], Decl(ES5For-ofTypeCheck10.ts, 7, 5))
22+
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
23+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
24+
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
2225

2326
return this;
2427
>this : Symbol(MyStringIterator, Decl(ES5For-ofTypeCheck10.ts, 0, 0))

tests/baselines/reference/ES5For-ofTypeCheck10.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ class MyStringIterator {
3131
[Symbol.iterator]() {
3232
>[Symbol.iterator] : () => this
3333
> : ^^^^^^^^^^
34-
>Symbol.iterator : any
35-
> : ^^^
36-
>Symbol : any
37-
> : ^^^
38-
>iterator : any
39-
> : ^^^
34+
>Symbol.iterator : unique symbol
35+
> : ^^^^^^^^^^^^^
36+
>Symbol : SymbolConstructor
37+
> : ^^^^^^^^^^^^^^^^^
38+
>iterator : unique symbol
39+
> : ^^^^^^^^^^^^^
4040

4141
return this;
4242
>this : this

tests/baselines/reference/ES5SymbolProperty1.symbols

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22

33
=== ES5SymbolProperty1.ts ===
44
interface SymbolConstructor {
5-
>SymbolConstructor : Symbol(SymbolConstructor, Decl(ES5SymbolProperty1.ts, 0, 0))
5+
>SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 0, 0))
66

77
foo: string;
88
>foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
99
}
1010
var Symbol: SymbolConstructor;
11-
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
12-
>SymbolConstructor : Symbol(SymbolConstructor, Decl(ES5SymbolProperty1.ts, 0, 0))
11+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
12+
>SymbolConstructor : Symbol(SymbolConstructor, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 0, 0))
1313

1414
var obj = {
1515
>obj : Symbol(obj, Decl(ES5SymbolProperty1.ts, 5, 3))
1616

1717
[Symbol.foo]: 0
1818
>[Symbol.foo] : Symbol([Symbol.foo], Decl(ES5SymbolProperty1.ts, 5, 11))
1919
>Symbol.foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
20-
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
20+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
2121
>foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
2222
}
2323

2424
obj[Symbol.foo];
2525
>obj : Symbol(obj, Decl(ES5SymbolProperty1.ts, 5, 3))
2626
>Symbol.foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
27-
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
27+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty1.ts, 3, 3))
2828
>foo : Symbol(SymbolConstructor.foo, Decl(ES5SymbolProperty1.ts, 0, 29))
2929

tests/baselines/reference/ES5SymbolProperty2.errors.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/baselines/reference/ES5SymbolProperty2.symbols

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@ module M {
2323
>M.C : Symbol(M.C, Decl(ES5SymbolProperty2.ts, 1, 20))
2424
>M : Symbol(M, Decl(ES5SymbolProperty2.ts, 0, 0))
2525
>C : Symbol(M.C, Decl(ES5SymbolProperty2.ts, 1, 20))
26+
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
27+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
28+
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
2629

tests/baselines/reference/ES5SymbolProperty2.types

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ module M {
77

88
var Symbol: any;
99
>Symbol : any
10-
> : ^^^
1110

1211
export class C {
1312
>C : C
@@ -17,7 +16,6 @@ module M {
1716
>[Symbol.iterator] : () => void
1817
> : ^^^^^^^^^^
1918
>Symbol.iterator : any
20-
> : ^^^
2119
>Symbol : any
2220
> : ^^^
2321
>iterator : any
@@ -33,16 +31,14 @@ module M {
3331
>C : typeof C
3432
> : ^^^^^^^^
3533
>Symbol.iterator : any
36-
> : ^^^
3734
>Symbol : any
3835
> : ^^^
3936
>iterator : any
4037
> : ^^^
4138
}
4239

4340
(new M.C)[Symbol.iterator];
44-
>(new M.C)[Symbol.iterator] : () => void
45-
> : ^^^^^^^^^^
41+
>(new M.C)[Symbol.iterator] : error
4642
>(new M.C) : M.C
4743
> : ^^^
4844
>new M.C : M.C
@@ -53,10 +49,10 @@ module M {
5349
> : ^^^^^^^^
5450
>C : typeof M.C
5551
> : ^^^^^^^^^^
56-
>Symbol.iterator : any
57-
> : ^^^
58-
>Symbol : any
59-
> : ^^^
60-
>iterator : any
61-
> : ^^^
52+
>Symbol.iterator : unique symbol
53+
> : ^^^^^^^^^^^^^
54+
>Symbol : SymbolConstructor
55+
> : ^^^^^^^^^^^^^^^^^
56+
>iterator : unique symbol
57+
> : ^^^^^^^^^^^^^
6258

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ES5SymbolProperty3.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type 'any'.
2+
3+
4+
==== ES5SymbolProperty3.ts (1 errors) ====
5+
var Symbol: any;
6+
~~~~~~
7+
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Symbol' must be of type 'SymbolConstructor', but here has type 'any'.
8+
!!! related TS6203 lib.es2015.symbol.d.ts:--:--: 'Symbol' was also declared here.
9+
10+
class C {
11+
[Symbol.iterator]() { }
12+
}
13+
14+
(new C)[Symbol.iterator]

tests/baselines/reference/ES5SymbolProperty3.symbols

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22

33
=== ES5SymbolProperty3.ts ===
44
var Symbol: any;
5-
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
5+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
66

77
class C {
88
>C : Symbol(C, Decl(ES5SymbolProperty3.ts, 0, 16))
99

1010
[Symbol.iterator]() { }
1111
>[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty3.ts, 2, 9))
12-
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
12+
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
13+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
14+
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
1315
}
1416

1517
(new C)[Symbol.iterator]
1618
>C : Symbol(C, Decl(ES5SymbolProperty3.ts, 0, 16))
17-
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
19+
>Symbol.iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
20+
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(ES5SymbolProperty3.ts, 0, 3))
21+
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
1822

tests/baselines/reference/ES5SymbolProperty3.types

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
=== ES5SymbolProperty3.ts ===
44
var Symbol: any;
5-
>Symbol : any
5+
>Symbol : SymbolConstructor
6+
> : ^^^^^^^^^^^^^^^^^
67

78
class C {
89
>C : C
@@ -11,11 +12,12 @@ class C {
1112
[Symbol.iterator]() { }
1213
>[Symbol.iterator] : () => void
1314
> : ^^^^^^^^^^
14-
>Symbol.iterator : any
15-
>Symbol : any
16-
> : ^^^
17-
>iterator : any
18-
> : ^^^
15+
>Symbol.iterator : unique symbol
16+
> : ^^^^^^^^^^^^^
17+
>Symbol : SymbolConstructor
18+
> : ^^^^^^^^^^^^^^^^^
19+
>iterator : unique symbol
20+
> : ^^^^^^^^^^^^^
1921
}
2022

2123
(new C)[Symbol.iterator]
@@ -27,9 +29,10 @@ class C {
2729
> : ^
2830
>C : typeof C
2931
> : ^^^^^^^^
30-
>Symbol.iterator : any
31-
>Symbol : any
32-
> : ^^^
33-
>iterator : any
34-
> : ^^^
32+
>Symbol.iterator : unique symbol
33+
> : ^^^^^^^^^^^^^
34+
>Symbol : SymbolConstructor
35+
> : ^^^^^^^^^^^^^^^^^
36+
>iterator : unique symbol
37+
> : ^^^^^^^^^^^^^
3538

0 commit comments

Comments
 (0)