Skip to content

Commit 16b986b

Browse files
committed
Accept new baselines
1 parent adb37a5 commit 16b986b

10 files changed

+40
-40
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(8,7): error TS2322: Type 'string' is not assignable to type 'number'.
33
tests/cases/conformance/jsdoc/0.js(11,20): error TS2322: Type 'string' is not assignable to type 'number'.
44
tests/cases/conformance/jsdoc/0.js(13,15): error TS2322: Type 'string' is not assignable to type 'number'.
@@ -15,7 +15,7 @@ tests/cases/conformance/jsdoc/0.js(22,22): error TS2345: Argument of type 'strin
1515
/** @type {string|undefined} */
1616
bar: 42,
1717
~~~~~~~
18-
!!! error TS2322: Type 'number' is not assignable to type 'string | undefined'.
18+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
1919
/** @type {function(number): number} */
2020
method1(n1) {
2121
return "42";

tests/baselines/reference/divergentAccessorsTypes2.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/divergentAccessorsTypes2.ts(10,1): error TS2322: Type '42' is not assignable to type 'string | undefined'.
1+
tests/cases/compiler/divergentAccessorsTypes2.ts(10,1): error TS2322: Type 'number' is not assignable to type 'string'.
22

33

44
==== tests/cases/compiler/divergentAccessorsTypes2.ts (1 errors) ====
@@ -13,5 +13,5 @@ tests/cases/compiler/divergentAccessorsTypes2.ts(10,1): error TS2322: Type '42'
1313
s.foo = "hello";
1414
s.foo = 42;
1515
~~~~~
16-
!!! error TS2322: Type '42' is not assignable to type 'string | undefined'.
16+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
1717

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/intersectionPropertyCheck.errors.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ tests/cases/compiler/intersectionPropertyCheck.ts(4,5): error TS2322: Type '{ a:
55
Type '{ y: string; }' has no properties in common with type '{ x?: number | undefined; }'.
66
tests/cases/compiler/intersectionPropertyCheck.ts(7,3): error TS2322: Type 'T & { a: boolean; }' is not assignable to type '{ a?: string | undefined; }'.
77
Types of property 'a' are incompatible.
8-
Type 'boolean' is not assignable to type 'string | undefined'.
9-
tests/cases/compiler/intersectionPropertyCheck.ts(17,22): error TS2322: Type 'true' is not assignable to type 'string[] | undefined'.
8+
Type 'boolean' is not assignable to type 'string'.
9+
tests/cases/compiler/intersectionPropertyCheck.ts(17,22): error TS2322: Type 'boolean' is not assignable to type 'string[]'.
1010

1111

1212
==== tests/cases/compiler/intersectionPropertyCheck.ts (4 errors) ====
@@ -28,7 +28,7 @@ tests/cases/compiler/intersectionPropertyCheck.ts(17,22): error TS2322: Type 'tr
2828
~
2929
!!! error TS2322: Type 'T & { a: boolean; }' is not assignable to type '{ a?: string | undefined; }'.
3030
!!! error TS2322: Types of property 'a' are incompatible.
31-
!!! error TS2322: Type 'boolean' is not assignable to type 'string | undefined'.
31+
!!! error TS2322: Type 'boolean' is not assignable to type 'string'.
3232
}
3333

3434
// Repro from #36637
@@ -40,7 +40,7 @@ tests/cases/compiler/intersectionPropertyCheck.ts(17,22): error TS2322: Type 'tr
4040
function test<T extends object>(value: T): Test {
4141
return { ...value, hi: true }
4242
~~
43-
!!! error TS2322: Type 'true' is not assignable to type 'string[] | undefined'.
43+
!!! error TS2322: Type 'boolean' is not assignable to type 'string[]'.
4444
!!! related TS6500 tests/cases/compiler/intersectionPropertyCheck.ts:13:12: The expected type comes from property 'hi' which is declared here on type 'Test'
4545
}
4646

tests/baselines/reference/mappedTypeErrors.errors.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(106,17): error TS2345:
2727
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(123,14): error TS2322: Type 'undefined' is not assignable to type 'string'.
2828
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(124,14): error TS2345: Argument of type '{ c: boolean; }' is not assignable to parameter of type 'Pick<Foo, keyof Foo>'.
2929
Object literal may only specify known properties, and 'c' does not exist in type 'Pick<Foo, keyof Foo>'.
30-
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(128,16): error TS2322: Type 'string' is not assignable to type 'number | undefined'.
31-
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(129,25): error TS2322: Type 'string' is not assignable to type 'number | undefined'.
32-
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,39): error TS2322: Type 'string' is not assignable to type 'number | undefined'.
30+
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(128,16): error TS2322: Type 'string' is not assignable to type 'number'.
31+
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(129,25): error TS2322: Type 'string' is not assignable to type 'number'.
32+
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(130,39): error TS2322: Type 'string' is not assignable to type 'number'.
3333
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,16): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
3434
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,21): error TS2536: Type 'P' cannot be used to index type 'T'.
3535
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(148,17): error TS2339: Property 'foo' does not exist on type 'Pick<T, K>'.
@@ -222,15 +222,15 @@ tests/cases/conformance/types/mapped/mappedTypeErrors.ts(152,17): error TS2339:
222222

223223
let x1: T2 = { a: 'no' }; // Error
224224
~
225-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
225+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
226226
!!! related TS6500 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:126:13: The expected type comes from property 'a' which is declared here on type 'T2'
227227
let x2: Partial<T2> = { a: 'no' }; // Error
228228
~
229-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
229+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
230230
!!! related TS6500 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:126:13: The expected type comes from property 'a' which is declared here on type 'Partial<T2>'
231231
let x3: { [P in keyof T2]: T2[P]} = { a: 'no' }; // Error
232232
~
233-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
233+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
234234
!!! related TS6500 tests/cases/conformance/types/mapped/mappedTypeErrors.ts:126:13: The expected type comes from property 'a' which is declared here on type '{ [x: string]: any; a?: number | undefined; }'
235235

236236
// Repro from #13044
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 'number' 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 'boolean' 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 'number' 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 'boolean' 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 'number' 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 'boolean' 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 'number' 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 'boolean' 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/objectLiteralNormalization.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(7,14): error TS2322: Type 'number' is not assignable to type 'string | undefined'.
1+
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(7,14): error TS2322: Type 'number' is not assignable to type 'string'.
22
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(8,1): error TS2322: Type '{ b: string; }' is not assignable to type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'.
33
Type '{ b: string; }' is missing the following properties from type '{ a: number; b: string; c: boolean; }': a, c
44
tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts(9,1): error TS2322: Type '{ c: true; }' is not assignable to type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'.
@@ -22,7 +22,7 @@ tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts
2222
a1 = { a: 1 };
2323
a1 = { a: 0, b: 0 }; // Error
2424
~
25-
!!! error TS2322: Type 'number' is not assignable to type 'string | undefined'.
25+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
2626
!!! related TS6500 tests/cases/conformance/expressions/objectLiterals/objectLiteralNormalization.ts:2:47: The expected type comes from property 'b' which is declared here on type '{ a: number; b?: undefined; c?: undefined; } | { a: number; b: string; c?: undefined; } | { a: number; b: string; c: boolean; }'
2727
a1 = { b: "y" }; // Error
2828
~~

tests/baselines/reference/tsxLibraryManagedAttributes.errors.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(55,12): error TS2322
33
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(57,41): error TS2322: Type '{ bar: string; baz: string; bat: string; }' is not assignable to type 'Defaultize<InferredPropTypes<{ foo: PropTypeChecker<number, false>; bar: PropTypeChecker<ReactNode, false>; baz: PropTypeChecker<string, true>; }>, { foo: number; }>'.
44
Property 'bat' does not exist on type 'Defaultize<InferredPropTypes<{ foo: PropTypeChecker<number, false>; bar: PropTypeChecker<ReactNode, false>; baz: PropTypeChecker<string, true>; }>, { foo: number; }>'.
55
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(59,42): error TS2322: Type 'null' is not assignable to type 'string'.
6-
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(69,26): error TS2322: Type 'string' is not assignable to type 'number | null | undefined'.
6+
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(69,26): error TS2322: Type 'string' is not assignable to type 'number'.
77
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(71,35): error TS2322: Type 'null' is not assignable to type 'ReactNode'.
88
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(80,38): error TS2322: Type '{ foo: number; bar: string; }' is not assignable to type 'Defaultize<{}, { foo: number; }>'.
99
Property 'bar' does not exist on type 'Defaultize<{}, { foo: number; }>'.
10-
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(81,29): error TS2322: Type 'string' is not assignable to type 'number | undefined'.
10+
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(81,29): error TS2322: Type 'string' is not assignable to type 'number'.
1111
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(98,12): error TS2322: Type '{ foo: string; }' is not assignable to type 'Defaultize<FooProps & InferredPropTypes<{ foo: PropTypeChecker<string, false>; bar: PropTypeChecker<ReactNode, false>; baz: PropTypeChecker<number, true>; }>, { foo: string; }>'.
1212
Type '{ foo: string; }' is missing the following properties from type '{ bar: ReactNode | null | undefined; baz: number; }': bar, baz
1313
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(100,56): error TS2322: Type '{ bar: string; baz: number; bat: string; }' is not assignable to type 'Defaultize<FooProps & InferredPropTypes<{ foo: PropTypeChecker<string, false>; bar: PropTypeChecker<ReactNode, false>; baz: PropTypeChecker<number, true>; }>, { foo: string; }>'.
@@ -18,7 +18,7 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(112,46): error TS232
1818
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(113,57): error TS2322: Type 'null' is not assignable to type 'ReactNode'.
1919
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(122,58): error TS2322: Type '{ foo: string; bar: string; }' is not assignable to type 'Defaultize<FooProps, { foo: string; }>'.
2020
Property 'bar' does not exist on type 'Defaultize<FooProps, { foo: string; }>'.
21-
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS2322: Type 'number' is not assignable to type 'string | undefined'.
21+
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS2322: Type 'number' is not assignable to type 'string'.
2222

2323

2424
==== tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx (15 errors) ====
@@ -100,7 +100,7 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232
100100
const g = <JustPropTypes foo={12} bar="ok" />;
101101
const h = <JustPropTypes foo="no" />; // error, wrong type
102102
~~~
103-
!!! error TS2322: Type 'string' is not assignable to type 'number | null | undefined'.
103+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
104104
!!! related TS6500 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:63:9: The expected type comes from property 'foo' which is declared here on type 'InferredPropTypes<{ foo: PropTypeChecker<number, false>; bar: PropTypeChecker<ReactNode, true>; }>'
105105
const i = <JustPropTypes foo={null} bar="ok" />;
106106
const j = <JustPropTypes foo={12} bar={null} />; // error, bar is required
@@ -121,7 +121,7 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232
121121
!!! error TS2322: Property 'bar' does not exist on type 'Defaultize<{}, { foo: number; }>'.
122122
const m = <JustDefaultProps foo="no" />; // error, wrong type
123123
~~~
124-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
124+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
125125
!!! related TS6500 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:75:9: The expected type comes from property 'foo' which is declared here on type 'Defaultize<{}, { foo: number; }>'
126126

127127
interface FooProps {
@@ -186,7 +186,7 @@ tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(123,49): error TS232
186186
!!! error TS2322: Property 'bar' does not exist on type 'Defaultize<FooProps, { foo: string; }>'.
187187
const z = <JustDefaultPropsWithSpecifiedGeneric foo={12} />; // error, wrong type
188188
~~~
189-
!!! error TS2322: Type 'number' is not assignable to type 'string | undefined'.
189+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
190190
!!! related TS6500 tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx:117:9: The expected type comes from property 'foo' which is declared here on type 'Defaultize<FooProps, { foo: string; }>'
191191
const aa = <JustDefaultPropsWithSpecifiedGeneric />;
192192

0 commit comments

Comments
 (0)