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
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/compiler/jsxElementType.errors.txt
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -24,9 +24,8 @@ jsxElementType.tsx(78,1): error TS2339: Property 'boop' does not exist on type '
24
24
jsxElementType.tsx(79,1): error TS2339: Property 'my-undeclared-custom-element' does not exist on type 'JSX.IntrinsicElements'.
25
25
jsxElementType.tsx(91,2): error TS2786: 'ReactNativeFlatList' cannot be used as a JSX component.
26
26
Its type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not a valid JSX element type.
27
-
Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '((props: any) => React18ReactNode) | (new (props: any) => Component<any, any, any>)'.
28
-
Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '(props: any) => React18ReactNode'.
29
-
Target signature provides too few arguments. Expected 2 or more, but got 1.
27
+
Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '(props: any) => React18ReactNode'.
28
+
Target signature provides too few arguments. Expected 2 or more, but got 1.
30
29
jsxElementType.tsx(95,11): error TS2322: Type '{}' is not assignable to type 'LibraryManagedAttributes<T, {}>'.
31
30
jsxElementType.tsx(98,2): error TS2304: Cannot find name 'Unresolved'.
32
31
jsxElementType.tsx(99,2): error TS2304: Cannot find name 'Unresolved'.
@@ -177,9 +176,8 @@ jsxElementType.tsx(111,19): error TS2322: Type '{ a: string; b: string; }' is no
177
176
~~~~~~~~~~~~~~~~~~~
178
177
!!! error TS2786: 'ReactNativeFlatList' cannot be used as a JSX component.
179
178
!!! error TS2786: Its type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not a valid JSX element type.
180
-
!!! error TS2786: Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '((props: any) => React18ReactNode) | (new (props: any) => Component<any, any, any>)'.
181
-
!!! error TS2786: Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '(props: any) => React18ReactNode'.
182
-
!!! error TS2786: Target signature provides too few arguments. Expected 2 or more, but got 1.
179
+
!!! error TS2786: Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '(props: any) => React18ReactNode'.
180
+
!!! error TS2786: Target signature provides too few arguments. Expected 2 or more, but got 1.
183
181
184
182
// testing higher-order component compat
185
183
function f1<T extends (props: {}) => React.ReactElement<any>>(Component: T) {
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/compiler/jsxElementType.errors.txt.diff
+2-25Lines changed: 2 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -18,18 +18,7 @@
18
18
Type '{ excessProp: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RenderStringClass> & Readonly<{ children?: ReactNode; }> & Readonly<{ title: string; }>'.
19
19
Property 'excessProp' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RenderStringClass> & Readonly<{ children?: ReactNode; }> & Readonly<{ title: string; }>'.
20
20
jsxElementType.tsx(78,1): error TS2339: Property 'boop' does not exist on type 'JSX.IntrinsicElements'.
21
-
jsxElementType.tsx(79,1): error TS2339: Property 'my-undeclared-custom-element' does not exist on type 'JSX.IntrinsicElements'.
22
-
jsxElementType.tsx(91,2): error TS2786: 'ReactNativeFlatList' cannot be used as a JSX component.
23
-
Its type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not a valid JSX element type.
24
-
- Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '(props: any) => React18ReactNode'.
25
-
- Target signature provides too few arguments. Expected 2 or more, but got 1.
26
-
+ Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '((props: any) => React18ReactNode) | (new (props: any) => Component<any, any, any>)'.
27
-
+ Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '(props: any) => React18ReactNode'.
28
-
+ Target signature provides too few arguments. Expected 2 or more, but got 1.
29
-
jsxElementType.tsx(95,11): error TS2322: Type '{}' is not assignable to type 'LibraryManagedAttributes<T, {}>'.
30
-
jsxElementType.tsx(98,2): error TS2304: Cannot find name 'Unresolved'.
31
-
jsxElementType.tsx(99,2): error TS2304: Cannot find name 'Unresolved'.
32
-
@@= skipped -129, +125 lines =@@
21
+
@@= skipped -129, +124 lines =@@
33
22
<RenderStringClass />;
34
23
~~~~~~~~~~~~~~~~~
35
24
!!! error TS2769: No overload matches this call.
@@ -59,16 +48,4 @@
59
48
+!!! related TS2771 react16.d.ts:357:13: The last overload is declared here.
60
49
61
50
// Host element types still work
62
-
<div />;
63
-
@@= skipped -42, +38 lines =@@
64
-
~~~~~~~~~~~~~~~~~~~
65
-
!!! error TS2786: 'ReactNativeFlatList' cannot be used as a JSX component.
66
-
!!! error TS2786: Its type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not a valid JSX element type.
67
-
-!!! error TS2786: Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '(props: any) => React18ReactNode'.
68
-
-!!! error TS2786: Target signature provides too few arguments. Expected 2 or more, but got 1.
69
-
+!!! error TS2786: Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '((props: any) => React18ReactNode) | (new (props: any) => Component<any, any, any>)'.
70
-
+!!! error TS2786: Type '(props: {}, ref: ForwardedRef<typeof ReactNativeFlatList>) => null' is not assignable to type '(props: any) => React18ReactNode'.
71
-
+!!! error TS2786: Target signature provides too few arguments. Expected 2 or more, but got 1.
72
-
73
-
// testing higher-order component compat
74
-
function f1<T extends (props: {}) => React.ReactElement<any>>(Component: T) {
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/compiler/jsxFragmentWrongType.errors.txt
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,7 @@
1
1
a.tsx(6,28): error TS2322: Type '{ children: () => string; }' is not assignable to type '{ children?: ReactNode; }'.
2
2
Types of property 'children' are incompatible.
3
3
Type '() => string' is not assignable to type 'ReactNode'.
4
-
Type '() => string' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal'.
5
4
a.tsx(7,47): error TS2322: Type '() => string' is not assignable to type 'ReactNode'.
6
-
Type '() => string' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal'.
7
5
8
6
9
7
==== a.tsx (2 errors) ====
@@ -17,10 +15,8 @@ a.tsx(7,47): error TS2322: Type '() => string' is not assignable to type 'ReactN
17
15
!!! error TS2322: Type '{ children: () => string; }' is not assignable to type '{ children?: ReactNode; }'.
18
16
!!! error TS2322: Types of property 'children' are incompatible.
19
17
!!! error TS2322: Type '() => string' is not assignable to type 'ReactNode'.
20
-
!!! error TS2322: Type '() => string' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal'.
!!! error TS2322: Type '() => string' is not assignable to type 'ReactNode'.
24
-
!!! error TS2322: Type '() => string' is not assignable to type 'ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal'.
25
21
!!! related TS6212 a.tsx:7:47: Did you mean to call this expression?
Copy file name to clipboardExpand all lines: testdata/baselines/reference/submodule/compiler/potentiallyUncalledDecorators.errors.txt
-28Lines changed: 0 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -3,34 +3,20 @@ potentiallyUncalledDecorators.ts(35,1): error TS1329: 'noArgs' accepts too few a
3
3
potentiallyUncalledDecorators.ts(37,5): error TS1329: 'noArgs' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@noArgs()'?
4
4
potentiallyUncalledDecorators.ts(38,5): error TS1329: 'noArgs' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@noArgs()'?
5
5
potentiallyUncalledDecorators.ts(41,2): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | typeof B'.
6
-
Type 'OmniDecorator' is not assignable to type 'typeof B'.
7
-
Type 'OmniDecorator' provides no match for the signature 'new (): B'.
8
6
potentiallyUncalledDecorators.ts(43,6): error TS1271: Decorator function return type is 'OmniDecorator' but is expected to be 'void' or 'any'.
9
7
potentiallyUncalledDecorators.ts(44,6): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | TypedPropertyDescriptor<() => void>'.
10
-
Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'.
11
8
potentiallyUncalledDecorators.ts(47,2): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | typeof C'.
12
-
Type 'OmniDecorator' is not assignable to type 'typeof C'.
13
-
Type 'OmniDecorator' provides no match for the signature 'new (): C'.
14
9
potentiallyUncalledDecorators.ts(49,5): error TS1329: 'oneOptional' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@oneOptional()'?
15
10
potentiallyUncalledDecorators.ts(50,5): error TS1329: 'oneOptional' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@oneOptional()'?
16
11
potentiallyUncalledDecorators.ts(53,2): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | typeof D'.
17
-
Type 'OmniDecorator' is not assignable to type 'typeof D'.
18
-
Type 'OmniDecorator' provides no match for the signature 'new (): D'.
19
12
potentiallyUncalledDecorators.ts(55,6): error TS1271: Decorator function return type is 'OmniDecorator' but is expected to be 'void' or 'any'.
20
13
potentiallyUncalledDecorators.ts(56,6): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | TypedPropertyDescriptor<() => void>'.
21
-
Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'.
22
14
potentiallyUncalledDecorators.ts(59,2): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | typeof E'.
23
-
Type 'OmniDecorator' is not assignable to type 'typeof E'.
24
-
Type 'OmniDecorator' provides no match for the signature 'new (): E'.
25
15
potentiallyUncalledDecorators.ts(61,6): error TS1271: Decorator function return type is 'OmniDecorator' but is expected to be 'void' or 'any'.
26
16
potentiallyUncalledDecorators.ts(62,6): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | TypedPropertyDescriptor<() => void>'.
27
-
Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'.
28
17
potentiallyUncalledDecorators.ts(65,2): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | typeof F'.
29
-
Type 'OmniDecorator' is not assignable to type 'typeof F'.
30
-
Type 'OmniDecorator' provides no match for the signature 'new (): F'.
31
18
potentiallyUncalledDecorators.ts(67,6): error TS1271: Decorator function return type is 'OmniDecorator' but is expected to be 'void' or 'any'.
32
19
potentiallyUncalledDecorators.ts(68,6): error TS1270: Decorator function return type 'OmniDecorator' is not assignable to type 'void | TypedPropertyDescriptor<() => void>'.
33
-
Type 'OmniDecorator' has no properties in common with type 'TypedPropertyDescriptor<() => void>'.
0 commit comments