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
// If sourceAttributesType has spread (e.g the type doesn't have freshness flag) after we check for assignability, we will do another pass to check that
13877
13877
// all explicitly specified attributes have correct name corresponding with target (as those will be assignable as spread type allows excess properties)
13878
13878
// Note: if the type of these explicitly specified attributes do not match it will be an error during above assignability check.
13879
-
if (sourceAttributesType !== anyType && !(sourceAttributesType.flags & TypeFlags.FreshLiteral)) {
Copy file name to clipboardExpand all lines: tests/baselines/reference/contextuallyTypedStringLiteralsInJsxAttributes02.errors.txt
+1-4Lines changed: 1 addition & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(27,24): error TS2322: Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
2
2
Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'LinkProps'.
3
3
Property 'goTo' is missing in type '{ extra: true; onClick: (k: "left" | "right") => void; }'.
4
-
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(27,64): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
5
4
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(28,24): error TS2322: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
6
5
Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'.
7
6
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(29,43): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,44): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/tsxSpreadAttributesResolution2.errors.txt
+2-5Lines changed: 2 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,9 @@ tests/cases/conformance/jsx/file.tsx(21,20): error TS2322: Type '{ X: "hi"; x: n
16
16
Type '{ X: "hi"; x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
17
17
Types of property 'x' are incompatible.
18
18
Type 'number' is not assignable to type 'string'.
19
-
tests/cases/conformance/jsx/file.tsx(21,40): error TS2339: Property 'X' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Poisoned> & PoisonedProp & { children?: ReactNode; }'.
@@ -63,6 +62,4 @@ tests/cases/conformance/jsx/file.tsx(21,40): error TS2339: Property 'X' does not
63
62
!!! error TS2322: Type '{ X: "hi"; x: number; y: "2"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Poisoned> & PoisonedProp & { children?: ReactNode; }'.
64
63
!!! error TS2322: Type '{ X: "hi"; x: number; y: "2"; }' is not assignable to type 'PoisonedProp'.
65
64
!!! error TS2322: Types of property 'x' are incompatible.
66
-
!!! error TS2322: Type 'number' is not assignable to type 'string'.
67
-
~~~~~~
68
-
!!! error TS2339: Property 'X' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Poisoned> & PoisonedProp & { children?: ReactNode; }'.
65
+
!!! error TS2322: Type 'number' is not assignable to type 'string'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/tsxStatelessFunctionComponentOverload5.errors.txt
+1-4Lines changed: 1 addition & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
tests/cases/conformance/jsx/file.tsx(48,24): error TS2322: Type '{ to: "/some/path"; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
2
2
Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'.
3
-
tests/cases/conformance/jsx/file.tsx(49,24): error TS2339: Property 'onClick' does not exist on type 'IntrinsicAttributes & HyphenProps'.
4
3
tests/cases/conformance/jsx/file.tsx(49,24): error TS2322: Type '{ to: string; onClick: (e: any) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
5
4
Type '{ to: string; onClick: (e: any) => void; children: string; }' is not assignable to type 'HyphenProps'.
6
5
Property '"data-format"' is missing in type '{ to: string; onClick: (e: any) => void; children: string; }'.
@@ -25,7 +24,7 @@ tests/cases/conformance/jsx/file.tsx(56,24): error TS2322: Type '{ data-format:
@@ -78,8 +77,6 @@ tests/cases/conformance/jsx/file.tsx(56,24): error TS2322: Type '{ data-format:
78
77
!!! error TS2322: Type '{ to: "/some/path"; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
79
78
!!! error TS2322: Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'.
0 commit comments