Update more baselines (?)

This commit is contained in:
Nathan Shively-Sanders 2019-07-08 13:04:59 -07:00
parent 2233ebadea
commit 05a4e8f29e
4 changed files with 79 additions and 79 deletions

View File

@ -1,4 +1,4 @@
tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,17): error TS2763: No overload matches this call.
tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,17): error TS2769: No overload matches this call.
Overload 1 of 2, '(props: Readonly<ResizablePanelProps>): ResizablePanel', gave the following error.
Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
Types of property 'children' are incompatible.
@ -30,17 +30,17 @@ tests/cases/conformance/jsx/checkJsxChildrenCanBeTupleType.tsx(17,17): error TS2
const testErr = <ResizablePanel>
~~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 2, '(props: Readonly<ResizablePanelProps>): ResizablePanel', gave the following error.
!!! error TS2763: Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
!!! error TS2763: Types of property 'children' are incompatible.
!!! error TS2763: Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'.
!!! error TS2763: Types of property 'length' are incompatible.
!!! error TS2763: Type '3' is not assignable to type '2'.
!!! error TS2763: Overload 2 of 2, '(props: ResizablePanelProps, context?: any): ResizablePanel', gave the following error.
!!! error TS2763: Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
!!! error TS2763: Types of property 'children' are incompatible.
!!! error TS2763: Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 2, '(props: Readonly<ResizablePanelProps>): ResizablePanel', gave the following error.
!!! error TS2769: Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
!!! error TS2769: Types of property 'children' are incompatible.
!!! error TS2769: Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'.
!!! error TS2769: Types of property 'length' are incompatible.
!!! error TS2769: Type '3' is not assignable to type '2'.
!!! error TS2769: Overload 2 of 2, '(props: ResizablePanelProps, context?: any): ResizablePanel', gave the following error.
!!! error TS2769: Type '{ children: [Element, Element, Element]; }' is not assignable to type 'Readonly<ResizablePanelProps>'.
!!! error TS2769: Types of property 'children' are incompatible.
!!! error TS2769: Type '[Element, Element, Element]' is not assignable to type '[ReactNode, ReactNode]'.
<div />
<div />
<div />

View File

@ -1,4 +1,4 @@
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,21): error TS2763: No overload matches this call.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,21): error TS2769: No overload matches this call.
Overload 1 of 2, '(props: Readonly<Props>): FieldFeedback<Props>', gave the following error.
Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
@ -6,7 +6,7 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,21): error TS2763:
Overload 2 of 2, '(props: Props, context?: any): FieldFeedback<Props>', gave the following error.
Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,22): error TS2763: No overload matches this call.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,22): error TS2769: No overload matches this call.
Overload 1 of 2, '(props: Readonly<Props>): FieldFeedbackBeta<Props>', gave the following error.
Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
@ -14,7 +14,7 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,22): error TS2763:
Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta<Props>', gave the following error.
Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2763: No overload matches this call.
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2769: No overload matches this call.
Overload 1 of 2, '(props: Readonly<MyPropsProps>): FieldFeedback2<MyPropsProps>', gave the following error.
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
Type 'void' is not assignable to type 'boolean'.
@ -51,14 +51,14 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2763:
// Error: Void not assignable to boolean
const Test2 = () => <FieldFeedback when={value => console.log(value)} />;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 2, '(props: Readonly<Props>): FieldFeedback<Props>', gave the following error.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2763: Type 'void' is not assignable to type 'boolean'.
!!! error TS2763: Overload 2 of 2, '(props: Props, context?: any): FieldFeedback<Props>', gave the following error.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 2, '(props: Readonly<Props>): FieldFeedback<Props>', gave the following error.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769: Type 'void' is not assignable to type 'boolean'.
!!! error TS2769: Overload 2 of 2, '(props: Props, context?: any): FieldFeedback<Props>', gave the following error.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! 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>>'
!!! 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>>'
@ -78,14 +78,14 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2763:
// Error: Void not assignable to boolean
const Test2a = () => <FieldFeedbackBeta when={value => console.log(value)} error>Hah</FieldFeedbackBeta>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 2, '(props: Readonly<Props>): FieldFeedbackBeta<Props>', gave the following error.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2763: Type 'void' is not assignable to type 'boolean'.
!!! error TS2763: Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta<Props>', gave the following error.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 2, '(props: Readonly<Props>): FieldFeedbackBeta<Props>', gave the following error.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769: Type 'void' is not assignable to type 'boolean'.
!!! error TS2769: Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta<Props>', gave the following error.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! 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>>'
!!! 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>>'
@ -110,12 +110,12 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,21): error TS2763:
// Error: Void not assignable to boolean
const Test4 = () => <FieldFeedback2 when={value => console.log(value)} />;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 2, '(props: Readonly<MyPropsProps>): FieldFeedback2<MyPropsProps>', gave the following error.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2763: Type 'void' is not assignable to type 'boolean'.
!!! error TS2763: Overload 2 of 2, '(props: MyPropsProps, context?: any): FieldFeedback2<MyPropsProps>', gave the following error.
!!! error TS2763: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 2, '(props: Readonly<MyPropsProps>): FieldFeedback2<MyPropsProps>', gave the following error.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! error TS2769: Type 'void' is not assignable to type 'boolean'.
!!! error TS2769: Overload 2 of 2, '(props: MyPropsProps, context?: any): FieldFeedback2<MyPropsProps>', gave the following error.
!!! error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
!!! 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>>'
!!! 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>>'

View File

@ -1,4 +1,4 @@
tests/cases/conformance/functions/strictBindCallApply1.ts(11,11): error TS2763: No overload matches this call.
tests/cases/conformance/functions/strictBindCallApply1.ts(11,11): error TS2769: No overload matches this call.
Overload 1 of 6, '(this: (this: undefined, arg0: 10, arg1: string) => string, thisArg: undefined, arg0: 10, arg1: string): () => string', gave the following error.
Argument of type '20' is not assignable to parameter of type 'string'.
Overload 2 of 6, '(this: (this: undefined, ...args: (10 | 20)[]) => string, thisArg: undefined, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error.
@ -15,7 +15,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(23,37): error TS2322:
tests/cases/conformance/functions/strictBindCallApply1.ts(24,32): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
Types of property 'length' are incompatible.
Type '3' is not assignable to type '2'.
tests/cases/conformance/functions/strictBindCallApply1.ts(41,11): error TS2763: No overload matches this call.
tests/cases/conformance/functions/strictBindCallApply1.ts(41,11): error TS2769: No overload matches this call.
Overload 1 of 6, '(this: (this: C, arg0: 10, arg1: string) => string, thisArg: C, arg0: 10, arg1: string): () => string', gave the following error.
Argument of type '20' is not assignable to parameter of type 'string'.
Overload 2 of 6, '(this: (this: C, ...args: (10 | 20)[]) => string, thisArg: C, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error.
@ -23,7 +23,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(41,11): error TS2763:
Types of parameters 'b' and 'args' are incompatible.
Type '10 | 20' is not assignable to type 'string'.
Type '10' is not assignable to type 'string'.
tests/cases/conformance/functions/strictBindCallApply1.ts(42,11): error TS2763: No overload matches this call.
tests/cases/conformance/functions/strictBindCallApply1.ts(42,11): error TS2769: No overload matches this call.
Overload 1 of 6, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error.
Argument of type 'undefined' is not assignable to parameter of type 'C'.
Overload 2 of 6, '(this: (this: C, ...args: (string | number)[]) => string, thisArg: C, ...args: (string | number)[]): (...args: (string | number)[]) => string', gave the following error.
@ -39,7 +39,7 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(54,26): error TS2345:
tests/cases/conformance/functions/strictBindCallApply1.ts(55,31): error TS2322: Type 'number' is not assignable to type 'string'.
tests/cases/conformance/functions/strictBindCallApply1.ts(56,26): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'.
tests/cases/conformance/functions/strictBindCallApply1.ts(57,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'.
tests/cases/conformance/functions/strictBindCallApply1.ts(62,11): error TS2763: No overload matches this call.
tests/cases/conformance/functions/strictBindCallApply1.ts(62,11): error TS2769: No overload matches this call.
Overload 1 of 6, '(this: new (arg0: 10, arg1: string) => C, thisArg: any, arg0: 10, arg1: string): new () => C', gave the following error.
Argument of type '20' is not assignable to parameter of type 'string'.
Overload 2 of 6, '(this: new (...args: (10 | 20)[]) => C, thisArg: any, ...args: (10 | 20)[]): new (...args: (10 | 20)[]) => C', gave the following error.
@ -68,14 +68,14 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345:
let f02 = foo.bind(undefined, 10, "hello");
let f03 = foo.bind(undefined, 10, 20); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 6, '(this: (this: undefined, arg0: 10, arg1: string) => string, thisArg: undefined, arg0: 10, arg1: string): () => string', gave the following error.
!!! error TS2763: Argument of type '20' is not assignable to parameter of type 'string'.
!!! error TS2763: Overload 2 of 6, '(this: (this: undefined, ...args: (10 | 20)[]) => string, thisArg: undefined, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error.
!!! error TS2763: The 'this' context of type '(a: number, b: string) => string' is not assignable to method's 'this' of type '(this: undefined, ...args: (10 | 20)[]) => string'.
!!! error TS2763: Types of parameters 'b' and 'args' are incompatible.
!!! error TS2763: Type '10 | 20' is not assignable to type 'string'.
!!! error TS2763: Type '10' is not assignable to type 'string'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 6, '(this: (this: undefined, arg0: 10, arg1: string) => string, thisArg: undefined, arg0: 10, arg1: string): () => string', gave the following error.
!!! error TS2769: Argument of type '20' is not assignable to parameter of type 'string'.
!!! error TS2769: Overload 2 of 6, '(this: (this: undefined, ...args: (10 | 20)[]) => string, thisArg: undefined, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error.
!!! error TS2769: The 'this' context of type '(a: number, b: string) => string' is not assignable to method's 'this' of type '(this: undefined, ...args: (10 | 20)[]) => string'.
!!! error TS2769: Types of parameters 'b' and 'args' are incompatible.
!!! error TS2769: Type '10 | 20' is not assignable to type 'string'.
!!! error TS2769: Type '10' is not assignable to type 'string'.
let f04 = overloaded.bind(undefined); // typeof overloaded
let f05 = generic.bind(undefined); // typeof generic
@ -122,24 +122,24 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345:
let f12 = c.foo.bind(c, 10, "hello");
let f13 = c.foo.bind(c, 10, 20); // Error
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 6, '(this: (this: C, arg0: 10, arg1: string) => string, thisArg: C, arg0: 10, arg1: string): () => string', gave the following error.
!!! error TS2763: Argument of type '20' is not assignable to parameter of type 'string'.
!!! error TS2763: Overload 2 of 6, '(this: (this: C, ...args: (10 | 20)[]) => string, thisArg: C, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error.
!!! error TS2763: The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (10 | 20)[]) => string'.
!!! error TS2763: Types of parameters 'b' and 'args' are incompatible.
!!! error TS2763: Type '10 | 20' is not assignable to type 'string'.
!!! error TS2763: Type '10' is not assignable to type 'string'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 6, '(this: (this: C, arg0: 10, arg1: string) => string, thisArg: C, arg0: 10, arg1: string): () => string', gave the following error.
!!! error TS2769: Argument of type '20' is not assignable to parameter of type 'string'.
!!! error TS2769: Overload 2 of 6, '(this: (this: C, ...args: (10 | 20)[]) => string, thisArg: C, ...args: (10 | 20)[]): (...args: (10 | 20)[]) => string', gave the following error.
!!! error TS2769: The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (10 | 20)[]) => string'.
!!! error TS2769: Types of parameters 'b' and 'args' are incompatible.
!!! error TS2769: Type '10 | 20' is not assignable to type 'string'.
!!! error TS2769: Type '10' is not assignable to type 'string'.
let f14 = c.foo.bind(undefined); // Error
~~~~~~~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 6, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error.
!!! error TS2763: Argument of type 'undefined' is not assignable to parameter of type 'C'.
!!! error TS2763: Overload 2 of 6, '(this: (this: C, ...args: (string | number)[]) => string, thisArg: C, ...args: (string | number)[]): (...args: (string | number)[]) => string', gave the following error.
!!! error TS2763: The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (string | number)[]) => string'.
!!! error TS2763: Types of parameters 'a' and 'args' are incompatible.
!!! error TS2763: Type 'string | number' is not assignable to type 'number'.
!!! error TS2763: Type 'string' is not assignable to type 'number'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 6, '(this: (this: C, a: number, b: string) => string, thisArg: C): (a: number, b: string) => string', gave the following error.
!!! error TS2769: Argument of type 'undefined' is not assignable to parameter of type 'C'.
!!! error TS2769: Overload 2 of 6, '(this: (this: C, ...args: (string | number)[]) => string, thisArg: C, ...args: (string | number)[]): (...args: (string | number)[]) => string', gave the following error.
!!! error TS2769: The 'this' context of type '(this: C, a: number, b: string) => string' is not assignable to method's 'this' of type '(this: C, ...args: (string | number)[]) => string'.
!!! error TS2769: Types of parameters 'a' and 'args' are incompatible.
!!! error TS2769: Type 'string | number' is not assignable to type 'number'.
!!! error TS2769: Type 'string' is not assignable to type 'number'.
let f15 = c.overloaded.bind(c); // typeof C.prototype.overloaded
let f16 = c.generic.bind(c); // typeof C.prototype.generic
@ -177,14 +177,14 @@ tests/cases/conformance/functions/strictBindCallApply1.ts(72,12): error TS2345:
let f22 = C.bind(undefined, 10, "hello");
let f23 = C.bind(undefined, 10, 20); // Error
~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 6, '(this: new (arg0: 10, arg1: string) => C, thisArg: any, arg0: 10, arg1: string): new () => C', gave the following error.
!!! error TS2763: Argument of type '20' is not assignable to parameter of type 'string'.
!!! error TS2763: Overload 2 of 6, '(this: new (...args: (10 | 20)[]) => C, thisArg: any, ...args: (10 | 20)[]): new (...args: (10 | 20)[]) => C', gave the following error.
!!! error TS2763: The 'this' context of type 'typeof C' is not assignable to method's 'this' of type 'new (...args: (10 | 20)[]) => C'.
!!! error TS2763: Types of parameters 'b' and 'args' are incompatible.
!!! error TS2763: Type '10 | 20' is not assignable to type 'string'.
!!! error TS2763: Type '10' is not assignable to type 'string'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 6, '(this: new (arg0: 10, arg1: string) => C, thisArg: any, arg0: 10, arg1: string): new () => C', gave the following error.
!!! error TS2769: Argument of type '20' is not assignable to parameter of type 'string'.
!!! error TS2769: Overload 2 of 6, '(this: new (...args: (10 | 20)[]) => C, thisArg: any, ...args: (10 | 20)[]): new (...args: (10 | 20)[]) => C', gave the following error.
!!! error TS2769: The 'this' context of type 'typeof C' is not assignable to method's 'this' of type 'new (...args: (10 | 20)[]) => C'.
!!! error TS2769: Types of parameters 'b' and 'args' are incompatible.
!!! error TS2769: Type '10 | 20' is not assignable to type 'string'.
!!! error TS2769: Type '10' is not assignable to type 'string'.
C.call(c, 10, "hello");
C.call(c, 10); // Error

View File

@ -1,6 +1,6 @@
tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(14,14): error TS2322: Type '{}' is not assignable to type 'P'.
'{}' is assignable to the constraint of type 'P', but 'P' could be instantiated with a different subtype of constraint '{}'.
tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,13): error TS2763: No overload matches this call.
tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,13): error TS2769: No overload matches this call.
Overload 1 of 2, '(props: Readonly<P>): MyComponent', gave the following error.
Type '{}' is not assignable to type 'Readonly<P>'.
Overload 2 of 2, '(props: P, context?: any): MyComponent', gave the following error.
@ -27,11 +27,11 @@ tests/cases/compiler/tsxNotUsingApparentTypeOfSFC.tsx(15,13): error TS2763: No o
!!! error TS2322: '{}' is assignable to the constraint of type 'P', but 'P' could be instantiated with a different subtype of constraint '{}'.
let y = <MyComponent />; // should error
~~~~~~~~~~~~~~~
!!! error TS2763: No overload matches this call.
!!! error TS2763: Overload 1 of 2, '(props: Readonly<P>): MyComponent', gave the following error.
!!! error TS2763: Type '{}' is not assignable to type 'Readonly<P>'.
!!! error TS2763: Overload 2 of 2, '(props: P, context?: any): MyComponent', gave the following error.
!!! error TS2763: Type '{}' is not assignable to type 'Readonly<P>'.
!!! error TS2769: No overload matches this call.
!!! error TS2769: Overload 1 of 2, '(props: Readonly<P>): MyComponent', gave the following error.
!!! error TS2769: Type '{}' is not assignable to type 'Readonly<P>'.
!!! error TS2769: Overload 2 of 2, '(props: P, context?: any): MyComponent', gave the following error.
!!! error TS2769: Type '{}' is not assignable to type 'Readonly<P>'.
let z = <MySFC {...wrappedProps} /> // should work
let q = <MyComponent {...wrappedProps} /> // should work