You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/cases/conformance/interfaces/interfaceDeclarations/interfaceExtendsObjectIntersectionErrors.ts(35,29): error TS2411: Property 'a' of type '"hello"' is not assignable to 'string' index type 'number'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/intersectionPropertyCheck.errors.txt
+4-4
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,8 @@ tests/cases/compiler/intersectionPropertyCheck.ts(4,5): error TS2322: Type '{ a:
5
5
Type '{ y: string; }' has no properties in common with type '{ x?: number | undefined; }'.
6
6
tests/cases/compiler/intersectionPropertyCheck.ts(7,3): error TS2322: Type 'T & { a: boolean; }' is not assignable to type '{ a?: string | undefined; }'.
7
7
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[]'.
@@ -28,7 +28,7 @@ tests/cases/compiler/intersectionPropertyCheck.ts(17,22): error TS2322: Type 'tr
28
28
~
29
29
!!! error TS2322: Type 'T & { a: boolean; }' is not assignable to type '{ a?: string | undefined; }'.
30
30
!!! 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'.
32
32
}
33
33
34
34
// Repro from #36637
@@ -40,7 +40,7 @@ tests/cases/compiler/intersectionPropertyCheck.ts(17,22): error TS2322: Type 'tr
40
40
function test<T extends object>(value: T): Test {
41
41
return { ...value, hi: true }
42
42
~~
43
-
!!! error TS2322: Type 'true' is not assignable to type 'string[] | undefined'.
43
+
!!! error TS2322: Type 'boolean' is not assignable to type 'string[]'.
44
44
!!! related TS6500 tests/cases/compiler/intersectionPropertyCheck.ts:13:12: The expected type comes from property 'hi' which is declared here on type 'Test'
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(123,14): error TS2322: Type 'undefined' is not assignable to type 'string'.
28
28
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>'.
29
29
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'.
33
33
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,16): error TS2322: Type 'T' is not assignable to type 'string | number | symbol'.
34
34
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(136,21): error TS2536: Type 'P' cannot be used to index type 'T'.
35
35
tests/cases/conformance/types/mapped/mappedTypeErrors.ts(148,17): error TS2339: Property 'foo' does not exist on type 'Pick<T, K>'.
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
225
+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
226
226
!!! 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'
227
227
let x2: Partial<T2> = { a: 'no' }; // Error
228
228
~
229
-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
229
+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
230
230
!!! 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>'
231
231
let x3: { [P in keyof T2]: T2[P]} = { a: 'no' }; // Error
232
232
~
233
-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
233
+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
234
234
!!! 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; }'
Copy file name to clipboardExpand all lines: tests/baselines/reference/objectLiteralNormalization.errors.txt
+2-2
Original file line number
Diff line number
Diff 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'.
2
2
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; }'.
3
3
Type '{ b: string; }' is missing the following properties from type '{ a: number; b: string; c: boolean; }': a, c
4
4
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; }'.
!!! error TS2322: Type 'number' is not assignable to type 'string | undefined'.
25
+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
26
26
!!! 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; }'
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; }>'.
4
4
Property 'bat' does not exist on type 'Defaultize<InferredPropTypes<{ foo: PropTypeChecker<number, false>; bar: PropTypeChecker<ReactNode, false>; baz: PropTypeChecker<string, true>; }>, { foo: number; }>'.
5
5
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'.
7
7
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(71,35): error TS2322: Type 'null' is not assignable to type 'ReactNode'.
8
8
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(80,38): error TS2322: Type '{ foo: number; bar: string; }' is not assignable to type 'Defaultize<{}, { foo: number; }>'.
9
9
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'.
11
11
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; }>'.
12
12
Type '{ foo: string; }' is missing the following properties from type '{ bar: ReactNode | null | undefined; baz: number; }': bar, baz
13
13
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; }>'.
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(113,57): error TS2322: Type 'null' is not assignable to type 'ReactNode'.
19
19
tests/cases/conformance/jsx/tsxLibraryManagedAttributes.tsx(122,58): error TS2322: Type '{ foo: string; bar: string; }' is not assignable to type 'Defaultize<FooProps, { foo: string; }>'.
20
20
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'.
const h = <JustPropTypes foo="no" />; // error, wrong type
102
102
~~~
103
-
!!! error TS2322: Type 'string' is not assignable to type 'number | null | undefined'.
103
+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
104
104
!!! 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>; }>'
105
105
const i = <JustPropTypes foo={null} bar="ok" />;
106
106
const j = <JustPropTypes foo={12} bar={null} />; // error, bar is required
!!! error TS2322: Property 'bar' does not exist on type 'Defaultize<{}, { foo: number; }>'.
122
122
const m = <JustDefaultProps foo="no" />; // error, wrong type
123
123
~~~
124
-
!!! error TS2322: Type 'string' is not assignable to type 'number | undefined'.
124
+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
125
125
!!! 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; }>'
!!! error TS2322: Property 'bar' does not exist on type 'Defaultize<FooProps, { foo: string; }>'.
187
187
const z = <JustDefaultPropsWithSpecifiedGeneric foo={12} />; // error, wrong type
188
188
~~~
189
-
!!! error TS2322: Type 'number' is not assignable to type 'string | undefined'.
189
+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
190
190
!!! 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; }>'
191
191
const aa = <JustDefaultPropsWithSpecifiedGeneric />;
0 commit comments