mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
110 lines
9.0 KiB
Diff
110 lines
9.0 KiB
Diff
--- old.tsxStatelessFunctionComponentOverload5.errors.txt
|
|
+++ new.tsxStatelessFunctionComponentOverload5.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
file.tsx(43,16): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
file.tsx(46,12): error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
-file.tsx(50,13): error TS2769: No overload matches this call.
|
|
- Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
|
|
- Type '{ to: string; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
- Property 'to' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
- Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
|
|
- Type '{ to: string; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
|
- Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
|
- Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
|
|
+file.tsx(50,24): error TS2769: No overload matches this call.
|
|
+ The last overload gave the following error.
|
|
Type '{ to: string; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
|
|
Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'.
|
|
file.tsx(56,51): error TS2769: No overload matches this call.
|
|
- Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
|
|
- Type 'number' is not assignable to type 'string'.
|
|
- Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
|
|
- Type 'number' is not assignable to type 'string'.
|
|
- Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
|
|
+ The last overload gave the following error.
|
|
Type 'number' is not assignable to type 'string'.
|
|
file.tsx(57,68): error TS2769: No overload matches this call.
|
|
- Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
|
|
- Type 'boolean' is not assignable to type 'string'.
|
|
- Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
|
|
- Type 'boolean' is not assignable to type 'string'.
|
|
- Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
|
|
+ The last overload gave the following error.
|
|
Type 'boolean' is not assignable to type 'string'.
|
|
file.tsx(58,13): error TS2769: No overload matches this call.
|
|
- Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
|
|
- Property 'onClick' is missing in type '{ "data-format": true; }' but required in type 'ButtonProps'.
|
|
- Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
|
|
- Property 'to' is missing in type '{ "data-format": true; }' but required in type 'LinkProps'.
|
|
- Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
|
|
+ The last overload gave the following error.
|
|
Type '{ "data-format": true; }' is not assignable to type 'HyphenProps'.
|
|
Types of property '"data-format"' are incompatible.
|
|
Type 'boolean' is not assignable to type 'string'.
|
|
@@= skipped -91, +73 lines =@@
|
|
|
|
// Error
|
|
const b0 = <MainButton to='/some/path' onClick={(e)=>{}}>GO</MainButton>; // extra property;
|
|
- ~~~~~~~~~~
|
|
+ ~~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
|
|
-!!! error TS2769: Type '{ to: string; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & ButtonProps'.
|
|
-!!! error TS2769: Property 'to' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
|
-!!! error TS2769: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
|
|
-!!! error TS2769: Type '{ to: string; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
|
-!!! error TS2769: Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
|
-!!! error TS2769: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Type '{ to: string; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
|
|
!!! error TS2769: Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'.
|
|
+!!! related TS2771 file.tsx:39:17: The last overload is declared here.
|
|
!!! related TS2793 file.tsx:40:17: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
|
|
const b1 = <MainButton onClick={(e: any)=> {}} {...obj0}>Hello world</MainButton>; // extra property;
|
|
const b2 = <MainButton {...{to: "10000"}} {...obj2} />; // extra property
|
|
@@= skipped -20, +15 lines =@@
|
|
const b6 = <MainButton {...{ onClick(e: any){} }} children={10} />; // incorrect type for optional attribute
|
|
~~~~~~~~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
|
|
-!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
-!!! error TS2769: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
|
|
-!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
-!!! error TS2769: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
|
|
-!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
-!!! related TS6500 file.tsx:6:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & ButtonProps'
|
|
-!!! related TS6500 file.tsx:6:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & LinkProps'
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
+!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
!!! related TS6500 file.tsx:6:5: The expected type comes from property 'children' which is declared here on type 'IntrinsicAttributes & HyphenProps'
|
|
+!!! related TS2771 file.tsx:39:17: The last overload is declared here.
|
|
const b7 = <MainButton {...{ onClick(e: any){} }} children="hello" className />; // incorrect type for optional attribute
|
|
~~~~~~~~~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
|
|
-!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
|
|
-!!! error TS2769: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
|
|
-!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
|
|
-!!! error TS2769: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
|
|
-!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
|
|
-!!! related TS6500 file.tsx:7:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & ButtonProps'
|
|
-!!! related TS6500 file.tsx:7:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & LinkProps'
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
+!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
|
|
!!! related TS6500 file.tsx:7:5: The expected type comes from property 'className' which is declared here on type 'IntrinsicAttributes & HyphenProps'
|
|
+!!! related TS2771 file.tsx:39:17: The last overload is declared here.
|
|
const b8 = <MainButton data-format />; // incorrect type for specified hyphanated name
|
|
~~~~~~~~~~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 3, '(buttonProps: ButtonProps): Element', gave the following error.
|
|
-!!! error TS2769: Property 'onClick' is missing in type '{ "data-format": true; }' but required in type 'ButtonProps'.
|
|
-!!! error TS2769: Overload 2 of 3, '(linkProps: LinkProps): Element', gave the following error.
|
|
-!!! error TS2769: Property 'to' is missing in type '{ "data-format": true; }' but required in type 'LinkProps'.
|
|
-!!! error TS2769: Overload 3 of 3, '(hyphenProps: HyphenProps): Element', gave the following error.
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Type '{ "data-format": true; }' is not assignable to type 'HyphenProps'.
|
|
!!! error TS2769: Types of property '"data-format"' are incompatible.
|
|
!!! error TS2769: Type 'boolean' is not assignable to type 'string'.
|
|
-!!! related TS2728 file.tsx:11:5: 'onClick' is declared here.
|
|
-!!! related TS2728 file.tsx:15:5: 'to' is declared here.
|
|
+!!! related TS2771 file.tsx:39:17: The last overload is declared here.
|