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: tests/baselines/reference/jsxChildrenGenericContextualTypes.errors.txt
+14-16Lines changed: 14 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,13 @@
1
1
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(20,46): error TS2322: Type '"y"' is not assignable to type '"x"'.
2
-
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(21,19): error TS2322: Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'.
3
-
Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'.
2
+
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(21,19): error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'.
3
+
Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'.
4
4
Types of property 'children' are incompatible.
5
-
Type '(p: IntrinsicAttributes & LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'.
5
+
Type '(p: LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'.
6
6
Types of parameters 'p' and 'x' are incompatible.
7
-
Type 'LitProps<"x" | "y">' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
8
-
Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'.
9
-
Types of property 'prop' are incompatible.
10
-
Type '"x" | "y"' is not assignable to type '"x"'.
11
-
Type '"y"' is not assignable to type '"x"'.
7
+
Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'.
8
+
Types of property 'prop' are incompatible.
9
+
Type '"x" | "y"' is not assignable to type '"x"'.
10
+
Type '"y"' is not assignable to type '"x"'.
12
11
tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(22,21): error TS2322: Type '{ children: () => number; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
13
12
Type '{ children: () => number; prop: "x"; }' is not assignable to type 'LitProps<"x">'.
!!! error TS2322: Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'.
46
-
!!! error TS2322: Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'.
44
+
!!! error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'.
45
+
!!! error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'.
47
46
!!! error TS2322: Types of property 'children' are incompatible.
48
-
!!! error TS2322: Type '(p: IntrinsicAttributes & LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'.
47
+
!!! error TS2322: Type '(p: LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'.
49
48
!!! error TS2322: Types of parameters 'p' and 'x' are incompatible.
50
-
!!! error TS2322: Type 'LitProps<"x" | "y">' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'.
51
-
!!! error TS2322: Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'.
52
-
!!! error TS2322: Types of property 'prop' are incompatible.
53
-
!!! error TS2322: Type '"x" | "y"' is not assignable to type '"x"'.
54
-
!!! error TS2322: Type '"y"' is not assignable to type '"x"'.
49
+
!!! error TS2322: Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'.
50
+
!!! error TS2322: Types of property 'prop' are incompatible.
51
+
!!! error TS2322: Type '"x" | "y"' is not assignable to type '"x"'.
52
+
!!! error TS2322: Type '"y"' is not assignable to type '"x"'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt
+35-9Lines changed: 35 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,21 @@
1
-
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(26,36): error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
2
-
Type 'void' is not assignable to type 'boolean'.
3
-
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(48,37): error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
1
+
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,36): error TS2322: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
2
+
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
3
+
Type 'void' is not assignable to type 'boolean'.
4
+
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,41): error TS2322: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
5
+
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
6
+
Type 'void' is not assignable to type 'boolean'.
7
+
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
36
-
!!! error TS2322: Type 'void' is not assignable to type 'boolean'.
37
-
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
40
+
!!! error TS2322: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
41
+
!!! error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
42
+
!!! error TS2322: Type 'void' is not assignable to type 'boolean'.
43
+
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children" | "error"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
44
+
45
+
class FieldFeedbackBeta<P extends Props = BaseProps> extends React.Component<P> {
!!! error TS2322: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
62
+
!!! error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
63
+
!!! error TS2322: Type 'void' is not assignable to type 'boolean'.
64
+
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedbackBeta<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when" | "error">> & Partial<Pick<BaseProps, never>>'
!!! error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
62
88
!!! error TS2322: Type 'void' is not assignable to type 'boolean'.
63
-
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:30:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback2<MyPropsProps>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<MyPropsProps>, "children"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<MyPropsProps>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
89
+
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:46:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback2<MyPropsProps>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<MyPropsProps>, "children" | "error"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<MyPropsProps>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
0 commit comments