Skip to content

Commit 51d0ec1

Browse files
Accepted baselines.
1 parent e46cad8 commit 51d0ec1

13 files changed

+62
-62
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2322: Type '1 | ""' is not assignable to type 'boolean'.
2-
Type '1' is not assignable to type 'boolean'.
1+
tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2322: Type 'string | number' is not assignable to type 'boolean'.
2+
Type 'number' is not assignable to type 'boolean'.
33

44

55
==== tests/cases/compiler/conditionalExpression1.ts (1 errors) ====
66
var x: boolean = (true ? 1 : ""); // should be an error
77
~
8-
!!! error TS2322: Type '1 | ""' is not assignable to type 'boolean'.
9-
!!! error TS2322: Type '1' is not assignable to type 'boolean'.
8+
!!! error TS2322: Type 'string | number' is not assignable to type 'boolean'.
9+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
tests/cases/conformance/es6/for-ofStatements/for-of46.ts(3,7): error TS2322: Type 'boolean' is not assignable to type 'string'.
2-
tests/cases/conformance/es6/for-ofStatements/for-of46.ts(3,18): error TS2322: Type '""' is not assignable to type 'boolean'.
2+
tests/cases/conformance/es6/for-ofStatements/for-of46.ts(3,18): error TS2322: Type 'string' is not assignable to type 'boolean'.
33

44

55
==== tests/cases/conformance/es6/for-ofStatements/for-of46.ts (2 errors) ====
@@ -9,7 +9,7 @@ tests/cases/conformance/es6/for-ofStatements/for-of46.ts(3,18): error TS2322: Ty
99
~
1010
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
1111
~
12-
!!! error TS2322: Type '""' is not assignable to type 'boolean'.
12+
!!! error TS2322: Type 'string' is not assignable to type 'boolean'.
1313
k;
1414
v;
1515
}

tests/baselines/reference/generatorExplicitReturnType.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tests/cases/conformance/generators/generatorExplicitReturnType.ts(2,5): error TS2322: Type 'undefined' is not assignable to type 'number'.
22
tests/cases/conformance/generators/generatorExplicitReturnType.ts(3,11): error TS2322: Type 'string' is not assignable to type 'number'.
33
tests/cases/conformance/generators/generatorExplicitReturnType.ts(4,11): error TS2322: Type 'string' is not assignable to type 'number'.
4-
tests/cases/conformance/generators/generatorExplicitReturnType.ts(5,5): error TS2322: Type '10' is not assignable to type 'boolean'.
4+
tests/cases/conformance/generators/generatorExplicitReturnType.ts(5,5): error TS2322: Type 'number' is not assignable to type 'boolean'.
55
tests/cases/conformance/generators/generatorExplicitReturnType.ts(16,11): error TS2322: Type 'symbol' is not assignable to type 'number'.
66

77

@@ -18,7 +18,7 @@ tests/cases/conformance/generators/generatorExplicitReturnType.ts(16,11): error
1818
!!! error TS2322: Type 'string' is not assignable to type 'number'.
1919
return 10; // error
2020
~~~~~~~~~~
21-
!!! error TS2322: Type '10' is not assignable to type 'boolean'.
21+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
2222
}
2323

2424
function* g2(): Generator<number, boolean, string> {

tests/baselines/reference/jsdocInTypeScript.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
tests/cases/compiler/jsdocInTypeScript.ts(16,23): error TS2304: Cannot find name 'MyType'.
22
tests/cases/compiler/jsdocInTypeScript.ts(23,33): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
3-
tests/cases/compiler/jsdocInTypeScript.ts(25,3): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
3+
tests/cases/compiler/jsdocInTypeScript.ts(25,3): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
44
tests/cases/compiler/jsdocInTypeScript.ts(25,15): error TS2339: Property 'length' does not exist on type 'number'.
55
tests/cases/compiler/jsdocInTypeScript.ts(30,3): error TS2339: Property 'x' does not exist on type '{}'.
66
tests/cases/compiler/jsdocInTypeScript.ts(42,12): error TS2503: Cannot find namespace 'N'.
@@ -37,7 +37,7 @@ tests/cases/compiler/jsdocInTypeScript.ts(42,12): error TS2503: Cannot find name
3737
// Should fail, because it takes a boolean and returns a number
3838
f(1); f(true).length;
3939
~
40-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
40+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
4141
~~~~~~
4242
!!! error TS2339: Property 'length' does not exist on type 'number'.
4343

tests/baselines/reference/jsdocIndexSignature.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/jsdoc/indices.js(9,5): error TS2322: Type '1' is not assignable to type 'boolean'.
1+
tests/cases/conformance/jsdoc/indices.js(9,5): error TS2322: Type 'number' is not assignable to type 'boolean'.
22

33

44
==== tests/cases/conformance/jsdoc/indices.js (1 errors) ====
@@ -12,7 +12,7 @@ tests/cases/conformance/jsdoc/indices.js(9,5): error TS2322: Type '1' is not ass
1212
function f(o) {
1313
o.foo = 1; // error
1414
~~~~~
15-
!!! error TS2322: Type '1' is not assignable to type 'boolean'.
15+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
1616
o.bar = false; // ok
1717
}
1818

Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
tests/cases/conformance/jsdoc/jsdocPrivateName1.js(3,5): error TS2322: Type '3' is not assignable to type 'boolean'.
1+
tests/cases/conformance/jsdoc/jsdocPrivateName1.js(3,5): error TS2322: Type 'number' is not assignable to type 'boolean'.
22

33

44
==== tests/cases/conformance/jsdoc/jsdocPrivateName1.js (1 errors) ====
55
class A {
66
/** @type {boolean} some number value */
77
#foo = 3 // Error because not assignable to boolean
88
~~~~
9-
!!! error TS2322: Type '3' is not assignable to type 'boolean'.
9+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
1010
}
1111

tests/baselines/reference/matchReturnTypeInAllBranches.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/matchReturnTypeInAllBranches.ts(30,13): error TS2322: Type '12345' is not assignable to type 'boolean'.
1+
tests/cases/compiler/matchReturnTypeInAllBranches.ts(30,13): error TS2322: Type 'number' is not assignable to type 'boolean'.
22

33

44
==== tests/cases/compiler/matchReturnTypeInAllBranches.ts (1 errors) ====
@@ -33,7 +33,7 @@ tests/cases/compiler/matchReturnTypeInAllBranches.ts(30,13): error TS2322: Type
3333
{
3434
return 12345;
3535
~~~~~~~~~~~~~
36-
!!! error TS2322: Type '12345' is not assignable to type 'boolean'.
36+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
3737
}
3838
}
3939
}

tests/baselines/reference/parser15.4.4.14-9-2.errors.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(16,42): error TS2345: Argument of type '"0"' is not assignable to parameter of type 'boolean'.
1+
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(16,42): error TS2345: Argument of type 'string' is not assignable to parameter of type 'boolean'.
22
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(17,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
3-
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(18,17): error TS2345: Argument of type '0' is not assignable to parameter of type 'boolean'.
4-
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(19,17): error TS2345: Argument of type '0' is not assignable to parameter of type 'boolean'.
5-
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(20,17): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
3+
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(18,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
4+
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(19,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
5+
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(20,17): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
66
tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error TS2304: Cannot find name 'runTestCase'.
77

88

@@ -24,19 +24,19 @@ tests/cases/conformance/parser/ecmascript5/parser15.4.4.14-9-2.ts(25,1): error T
2424
var _float = -(4/3);
2525
var a = new Array(false,undefined,null,"0",obj,-1.3333333333333, "str",-0,true,+0, one, 1,0, false, _float, -(4/3));
2626
~~~
27-
!!! error TS2345: Argument of type '"0"' is not assignable to parameter of type 'boolean'.
27+
!!! error TS2345: Argument of type 'string' is not assignable to parameter of type 'boolean'.
2828
if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3)
2929
~~~~~~
3030
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
3131
a.indexOf(0) === 7 && // a[7] = +0, 0===+0
3232
~
33-
!!! error TS2345: Argument of type '0' is not assignable to parameter of type 'boolean'.
33+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
3434
a.indexOf(-0) === 7 && // a[7] = +0, -0===+0
3535
~~
36-
!!! error TS2345: Argument of type '0' is not assignable to parameter of type 'boolean'.
36+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
3737
a.indexOf(1) === 10 ) // a[10] =one=== 1
3838
~
39-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
39+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
4040
{
4141
return true;
4242
}

tests/baselines/reference/readonlyTupleAndArrayElaboration.errors.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(45,7): error TS2322: Ty
2828
tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(48,7): error TS2322: Type 'number[]' is not assignable to type 'boolean[]'.
2929
Type 'number' is not assignable to type 'boolean'.
3030
tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(51,7): error TS2322: Type 'readonly [1]' is not assignable to type 'readonly boolean[]'.
31-
Type '1' is not assignable to type 'boolean'.
31+
Type 'number' is not assignable to type 'boolean'.
3232
tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(54,7): error TS4104: The type 'readonly [1]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
3333
tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(57,7): error TS2322: Type '[1]' is not assignable to type 'readonly boolean[]'.
34-
Type '1' is not assignable to type 'boolean'.
34+
Type 'number' is not assignable to type 'boolean'.
3535
tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(60,7): error TS2322: Type '[1]' is not assignable to type 'boolean[]'.
36-
Type '1' is not assignable to type 'boolean'.
36+
Type 'number' is not assignable to type 'boolean'.
3737
tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(63,7): error TS2741: Property '0' is missing in type 'readonly number[]' but required in type 'readonly [1]'.
3838
tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(66,7): error TS4104: The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type '[1]'.
3939
tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(69,7): error TS2741: Property '0' is missing in type 'number[]' but required in type 'readonly [1]'.
@@ -137,7 +137,7 @@ tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(72,7): error TS2741: Pr
137137
const ta2: readonly boolean[] = ta1;
138138
~~~
139139
!!! error TS2322: Type 'readonly [1]' is not assignable to type 'readonly boolean[]'.
140-
!!! error TS2322: Type '1' is not assignable to type 'boolean'.
140+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
141141

142142
const ta3: readonly [1] = [1];
143143
const ta4: number[] = ta3;
@@ -148,13 +148,13 @@ tests/cases/compiler/readonlyTupleAndArrayElaboration.ts(72,7): error TS2741: Pr
148148
const ta6: readonly boolean[] = ta5;
149149
~~~
150150
!!! error TS2322: Type '[1]' is not assignable to type 'readonly boolean[]'.
151-
!!! error TS2322: Type '1' is not assignable to type 'boolean'.
151+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
152152

153153
const ta7: [1] = [1];
154154
const ta8: boolean[] = ta7;
155155
~~~
156156
!!! error TS2322: Type '[1]' is not assignable to type 'boolean[]'.
157-
!!! error TS2322: Type '1' is not assignable to type 'boolean'.
157+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
158158

159159
const at1: readonly number[] = [1];
160160
const at2: readonly [1] = at1;

tests/baselines/reference/restParameterWithBindingPattern3.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ tests/cases/compiler/restParameterWithBindingPattern3.ts(1,23): error TS2322: Ty
33
tests/cases/compiler/restParameterWithBindingPattern3.ts(3,23): error TS1186: A rest element cannot have an initializer.
44
tests/cases/compiler/restParameterWithBindingPattern3.ts(5,30): error TS2493: Tuple type '[boolean, string, number]' of length '3' has no element at index '3'.
55
tests/cases/compiler/restParameterWithBindingPattern3.ts(7,23): error TS2493: Tuple type '[boolean, string, number]' of length '3' has no element at index '3'.
6-
tests/cases/compiler/restParameterWithBindingPattern3.ts(9,19): error TS2322: Type '1' is not assignable to type 'boolean'.
6+
tests/cases/compiler/restParameterWithBindingPattern3.ts(9,19): error TS2322: Type 'number' is not assignable to type 'boolean'.
77
tests/cases/compiler/restParameterWithBindingPattern3.ts(9,29): error TS2322: Type 'boolean' is not assignable to type 'string'.
88
tests/cases/compiler/restParameterWithBindingPattern3.ts(9,48): error TS2566: A rest element cannot have a property name.
99

@@ -29,7 +29,7 @@ tests/cases/compiler/restParameterWithBindingPattern3.ts(9,48): error TS2566: A
2929

3030
function e(...{0: a = 1, 1: b = true, ...rest: rest}: [boolean, string, number]) { }
3131
~
32-
!!! error TS2322: Type '1' is not assignable to type 'boolean'.
32+
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.
3333
~
3434
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
3535
~~~~

tests/baselines/reference/taggedTemplateStringsWithIncompatibleTypedTags.errors.txt

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(14,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
2-
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(18,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
3-
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(22,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
4-
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(24,25): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
5-
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,9): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
6-
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,46): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
7-
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(28,57): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
1+
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(14,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
2+
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(18,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
3+
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(22,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
4+
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(24,25): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
5+
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,9): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
6+
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(26,46): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
7+
tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts(28,57): error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
88

99

1010
==== tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTypedTags.ts (7 errors) ====
@@ -23,33 +23,33 @@ tests/cases/conformance/es6/templates/taggedTemplateStringsWithIncompatibleTyped
2323

2424
f `abc${1}def${2}ghi`;
2525
~
26-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
26+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
2727

2828
f `abc`.member
2929

3030
f `abc${1}def${2}ghi`.member;
3131
~
32-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
32+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
3333

3434
f `abc`["member"];
3535

3636
f `abc${1}def${2}ghi`["member"];
3737
~
38-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
38+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
3939

4040
f `abc`[0].member `abc${1}def${2}ghi`;
4141
~
42-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
42+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
4343

4444
f `abc${1}def${2}ghi`["member"].member `abc${1}def${2}ghi`;
4545
~
46-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
46+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
4747
~
48-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
48+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
4949

5050
f `abc${ true }def${ true }ghi`["member"].member `abc${ 1 }def${ 2 }ghi`;
5151
~
52-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'.
52+
!!! error TS2345: Argument of type 'number' is not assignable to parameter of type 'boolean'.
5353

5454
f.thisIsNotATag(`abc`);
5555

0 commit comments

Comments
 (0)