Skip to content

Commit 60cfe02

Browse files
Accepted baselines.
1 parent 49ec0b0 commit 60cfe02

8 files changed

+36
-38
lines changed

tests/baselines/reference/checkJsdocTypeTagOnObjectProperty2.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/jsdoc/0.js(5,3): error TS2322: Type 'number' is not assignable to type 'string | undefined'.
1+
tests/cases/conformance/jsdoc/0.js(5,3): error TS2322: Type 'number' is not assignable to type 'string'.
22
tests/cases/conformance/jsdoc/0.js(7,3): error TS2322: Type '(n1: number) => string' is not assignable to type '(arg0: number) => number'.
33
Type 'string' is not assignable to type 'number'.
44
tests/cases/conformance/jsdoc/0.js(11,3): error TS2322: Type '(n1: number) => string' is not assignable to type '(arg0: number) => number'.
@@ -16,7 +16,7 @@ tests/cases/conformance/jsdoc/0.js(22,22): error TS2345: Argument of type '"0"'
1616
/** @type {string|undefined} */
1717
bar: 42,
1818
~~~~~~~
19-
!!! error TS2322: Type 'number' is not assignable to type 'string | undefined'.
19+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
2020
/** @type {function(number): number} */
2121
method1(n1) {
2222
~~~~~~~

tests/baselines/reference/interfaceExtendsObjectIntersectionErrors.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectI
3939
tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts(35,29): error TS2411: Property 'a' of type '"hello"' is not assignable to string index type 'number'.
4040
tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts(39,11): error TS2430: Interface 'I20' incorrectly extends interface 'Partial<T1>'.
4141
Types of property 'a' are incompatible.
42-
Type 'string' is not assignable to type 'number | undefined'.
42+
Type 'string' is not assignable to type 'number'.
4343
tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts(40,11): error TS2430: Interface 'I21' incorrectly extends interface 'Readonly<T1>'.
4444
Types of property 'a' are incompatible.
4545
Type 'string' is not assignable to type 'number'.
@@ -154,7 +154,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectI
154154
~~~
155155
!!! error TS2430: Interface 'I20' incorrectly extends interface 'Partial<T1>'.
156156
!!! error TS2430: Types of property 'a' are incompatible.
157-
!!! error TS2430: Type 'string' is not assignable to type 'number | undefined'.
157+
!!! error TS2430: Type 'string' is not assignable to type 'number'.
158158
interface I21 extends Readonly<T1> { a: string }
159159
~~~
160160
!!! error TS2430: Interface 'I21' incorrectly extends interface 'Readonly<T1>'.

tests/baselines/reference/intersectionWithUnionConstraint.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(10
1212
Type 'T & U' is not assignable to type 'number'.
1313
tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(11,9): error TS2322: Type 'T & U' is not assignable to type 'number | undefined'.
1414
Type 'string | undefined' is not assignable to type 'number | undefined'.
15-
Type 'string' is not assignable to type 'number | undefined'.
15+
Type 'string' is not assignable to type 'number'.
1616
Type 'T & U' is not assignable to type 'number'.
1717
tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12,9): error TS2322: Type 'T & U' is not assignable to type 'null | undefined'.
1818
Type 'string | undefined' is not assignable to type 'null | undefined'.
@@ -50,7 +50,7 @@ tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts(12
5050
~~
5151
!!! error TS2322: Type 'T & U' is not assignable to type 'number | undefined'.
5252
!!! error TS2322: Type 'string | undefined' is not assignable to type 'number | undefined'.
53-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
53+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
5454
!!! error TS2322: Type 'T & U' is not assignable to type 'number'.
5555
let y6: null | undefined = x; // Error
5656
~~

tests/baselines/reference/mappedTypeErrors.errors.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(124,14): error TS2345:
3939
Object literal may only specify known properties, and 'c' does not exist in type 'Pick<Foo, "a" | "b">'.
4040
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(128,5): error TS2322: Type '{ a: string; }' is not assignable to type 'T2'.
4141
Types of property 'a' are incompatible.
42-
Type 'string' is not assignable to type 'number | undefined'.
42+
Type 'string' is not assignable to type 'number'.
4343
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(129,5): error TS2322: Type '{ a: string; }' is not assignable to type 'Partial<T2>'.
4444
Types of property 'a' are incompatible.
45-
Type 'string' is not assignable to type 'number | undefined'.
45+
Type 'string' is not assignable to type 'number'.
4646
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,5): error TS2322: Type '{ a: string; }' is not assignable to type '{ [x: string]: any; a?: number | undefined; }'.
4747
Types of property 'a' are incompatible.
48-
Type 'string' is not assignable to type 'number | undefined'.
48+
Type 'string' is not assignable to type 'number'.
4949
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,16): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
5050
Type 'T' is not assignable to type 'symbol'.
5151
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,21): error TS2536: Type 'P' cannot be used to index type 'T'.
@@ -242,17 +242,17 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,21): error TS2536:
242242
~~
243243
!!! error TS2322: Type '{ a: string; }' is not assignable to type 'T2'.
244244
!!! error TS2322: Types of property 'a' are incompatible.
245-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
245+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
246246
let x2: Partial<T2> = { a: 'no' }; // Error
247247
~~
248248
!!! error TS2322: Type '{ a: string; }' is not assignable to type 'Partial<T2>'.
249249
!!! error TS2322: Types of property 'a' are incompatible.
250-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
250+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
251251
let x3: { [P in keyof T2]: T2[P]} = { a: 'no' }; // Error
252252
~~
253253
!!! error TS2322: Type '{ a: string; }' is not assignable to type '{ [x: string]: any; a?: number | undefined; }'.
254254
!!! error TS2322: Types of property 'a' are incompatible.
255-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
255+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
256256

257257
// Repro from #13044
258258

tests/baselines/reference/nestedFreshLiteral.errors.txt

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
tests/cases/compiler/nestedFreshLiteral.ts(12,21): error TS2322: Type '{ nested: { prop: { colour: string; }; }; }' is not assignable to type 'NestedCSSProps'.
22
Types of property 'nested' are incompatible.
3-
Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector | undefined'.
4-
Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'.
5-
Types of property 'prop' are incompatible.
6-
Type '{ colour: string; }' is not assignable to type 'CSSProps'.
7-
Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
3+
Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'.
4+
Types of property 'prop' are incompatible.
5+
Type '{ colour: string; }' is not assignable to type 'CSSProps'.
6+
Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
87

98

109
==== tests/cases/compiler/nestedFreshLiteral.ts (1 errors) ====
@@ -23,9 +22,8 @@ tests/cases/compiler/nestedFreshLiteral.ts(12,21): error TS2322: Type '{ nested:
2322
~~~~~~~~~~~~~
2423
!!! error TS2322: Type '{ nested: { prop: { colour: string; }; }; }' is not assignable to type 'NestedCSSProps'.
2524
!!! error TS2322: Types of property 'nested' are incompatible.
26-
!!! error TS2322: Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector | undefined'.
27-
!!! error TS2322: Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'.
28-
!!! error TS2322: Types of property 'prop' are incompatible.
29-
!!! error TS2322: Type '{ colour: string; }' is not assignable to type 'CSSProps'.
30-
!!! error TS2322: Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
25+
!!! error TS2322: Type '{ prop: { colour: string; }; }' is not assignable to type 'NestedSelector'.
26+
!!! error TS2322: Types of property 'prop' are incompatible.
27+
!!! error TS2322: Type '{ colour: string; }' is not assignable to type 'CSSProps'.
28+
!!! error TS2322: Object literal may only specify known properties, but 'colour' does not exist in type 'CSSProps'. Did you mean to write 'color'?
3129
}
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
tests/cases/compiler/objectCreate-errors.ts(1,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'.
2-
tests/cases/compiler/objectCreate-errors.ts(2,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'.
3-
tests/cases/compiler/objectCreate-errors.ts(3,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'.
1+
tests/cases/compiler/objectCreate-errors.ts(1,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object'.
2+
tests/cases/compiler/objectCreate-errors.ts(2,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object'.
3+
tests/cases/compiler/objectCreate-errors.ts(3,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'.
44
tests/cases/compiler/objectCreate-errors.ts(4,24): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'.
5-
tests/cases/compiler/objectCreate-errors.ts(7,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'.
6-
tests/cases/compiler/objectCreate-errors.ts(8,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'.
7-
tests/cases/compiler/objectCreate-errors.ts(9,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'.
5+
tests/cases/compiler/objectCreate-errors.ts(7,24): error TS2345: Argument of type '1' is not assignable to parameter of type 'object'.
6+
tests/cases/compiler/objectCreate-errors.ts(8,24): error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object'.
7+
tests/cases/compiler/objectCreate-errors.ts(9,24): error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'.
88
tests/cases/compiler/objectCreate-errors.ts(10,24): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'.
99

1010

1111
==== tests/cases/compiler/objectCreate-errors.ts (8 errors) ====
1212
var e1 = Object.create(1); // Error
1313
~
14-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'.
14+
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object'.
1515
var e2 = Object.create("string"); // Error
1616
~~~~~~~~
17-
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'.
17+
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object'.
1818
var e3 = Object.create(false); // Error
1919
~~~~~
20-
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'.
20+
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'.
2121
var e4 = Object.create(undefined); // Error
2222
~~~~~~~~~
2323
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'.
2424

2525

2626
var e5 = Object.create(1, {}); // Error
2727
~
28-
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object | null'.
28+
!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'object'.
2929
var e6 = Object.create("string", {}); // Error
3030
~~~~~~~~
31-
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object | null'.
31+
!!! error TS2345: Argument of type '"string"' is not assignable to parameter of type 'object'.
3232
var e7 = Object.create(false, {}); // Error
3333
~~~~~
34-
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object | null'.
34+
!!! error TS2345: Argument of type 'false' is not assignable to parameter of type 'object'.
3535
var e8 = Object.create(undefined, {}); // Error
3636
~~~~~~~~~
3737
!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'object | null'.

tests/baselines/reference/typeFromJSConstructor.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ tests/cases/conformance/salsa/a.js(10,5): error TS7008: Member 'twices' implicit
22
tests/cases/conformance/salsa/a.js(14,5): error TS2322: Type '"hi"' is not assignable to type 'number'.
33
tests/cases/conformance/salsa/a.js(21,5): error TS2322: Type 'false' is not assignable to type 'number'.
44
tests/cases/conformance/salsa/a.js(24,5): error TS2322: Type 'null' is not assignable to type 'string | undefined'.
5-
tests/cases/conformance/salsa/a.js(25,5): error TS2322: Type 'false' is not assignable to type 'string | undefined'.
5+
tests/cases/conformance/salsa/a.js(25,5): error TS2322: Type 'false' is not assignable to type 'string'.
66
tests/cases/conformance/salsa/a.js(26,5): error TS2531: Object is possibly 'null'.
77

88

@@ -41,7 +41,7 @@ tests/cases/conformance/salsa/a.js(26,5): error TS2531: Object is possibly 'null
4141
!!! error TS2322: Type 'null' is not assignable to type 'string | undefined'.
4242
this.twice = false // error
4343
~~~~~~~~~~
44-
!!! error TS2322: Type 'false' is not assignable to type 'string | undefined'.
44+
!!! error TS2322: Type 'false' is not assignable to type 'string'.
4545
this.twices.push(1) // error: Object is possibly null
4646
~~~~~~~~~~~
4747
!!! error TS2531: Object is possibly 'null'.

tests/baselines/reference/typeFromJSInitializer.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ tests/cases/conformance/salsa/a.js(4,5): error TS7008: Member 'unknowable' impli
33
tests/cases/conformance/salsa/a.js(5,5): error TS7008: Member 'empty' implicitly has an 'any[]' type.
44
tests/cases/conformance/salsa/a.js(25,12): error TS7006: Parameter 'a' implicitly has an 'any' type.
55
tests/cases/conformance/salsa/a.js(25,29): error TS7006: Parameter 'l' implicitly has an 'any[]' type.
6-
tests/cases/conformance/salsa/a.js(37,5): error TS2322: Type '"error"' is not assignable to type 'number | undefined'.
6+
tests/cases/conformance/salsa/a.js(37,5): error TS2322: Type '"error"' is not assignable to type 'number'.
77

88

99
==== tests/cases/conformance/salsa/a.js (6 errors) ====
@@ -55,7 +55,7 @@ tests/cases/conformance/salsa/a.js(37,5): error TS2322: Type '"error"' is not as
5555
b = undefined
5656
b = 'error'
5757
~
58-
!!! error TS2322: Type '"error"' is not assignable to type 'number | undefined'.
58+
!!! error TS2322: Type '"error"' is not assignable to type 'number'.
5959

6060
// l should be any[]
6161
l.push(1)

0 commit comments

Comments
 (0)