Update baselines
This commit is contained in:
parent
2c5117b2d9
commit
1e32b1097c
14 changed files with 66 additions and 82 deletions
|
@ -2,10 +2,10 @@ tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(27,24): err
|
|||
Type '{ extra: true; onClick: (k: "left" | "right") => void; }' is not assignable to type 'LinkProps'.
|
||||
Property 'goTo' is missing in type '{ extra: true; onClick: (k: "left" | "right") => void; }'.
|
||||
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'.
|
||||
Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
||||
Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'LinkProps'.
|
||||
Property 'goTo' is missing in type '{ onClick: (k: "left" | "right") => void; extra: true; }'.
|
||||
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(30,24): error TS2322: Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
||||
Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
||||
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(30,36): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
||||
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(33,65): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & ButtonProps'.
|
||||
tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,44): error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
||||
|
||||
|
@ -45,14 +45,14 @@ tests/cases/conformance/types/contextualTypes/jsxAttributes/file.tsx(36,44): err
|
|||
const b2 = <MainButton onClick={(k)=>{console.log(k)}} extra />; // k has type "left" | "right"
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
||||
!!! error TS2322: Property 'onClick' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
||||
!!! error TS2322: Type '{ onClick: (k: "left" | "right") => void; extra: true; }' is not assignable to type 'LinkProps'.
|
||||
!!! error TS2322: Property 'goTo' is missing in type '{ onClick: (k: "left" | "right") => void; extra: true; }'.
|
||||
const b3 = <MainButton {...{goTo:"home"}} extra />; // goTo has type"home" | "contact"
|
||||
~~~~~
|
||||
!!! error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
||||
const b4 = <MainButton goTo="home" extra />; // goTo has type "home" | "contact"
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ goTo: "home"; extra: true; }' is not assignable to type 'IntrinsicAttributes & LinkProps'.
|
||||
!!! error TS2322: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
||||
~~~~~
|
||||
!!! error TS2339: Property 'extra' does not exist on type 'IntrinsicAttributes & LinkProps'.
|
||||
|
||||
export function NoOverload(buttonProps: ButtonProps): JSX.Element { return undefined }
|
||||
const c1 = <NoOverload {...{onClick: (k) => {console.log(k)}}} extra />; // k has type any
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
tests/cases/conformance/jsx/file.tsx(23,8): error TS2322: Type '{ x: "0"; }' is not assignable to type 'Attribs1'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type '"0"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/jsx/file.tsx(24,8): error TS2322: Type '{ y: 0; }' is not assignable to type 'Attribs1'.
|
||||
Property 'y' does not exist on type 'Attribs1'.
|
||||
tests/cases/conformance/jsx/file.tsx(25,8): error TS2322: Type '{ y: "foo"; }' is not assignable to type 'Attribs1'.
|
||||
Property 'y' does not exist on type 'Attribs1'.
|
||||
tests/cases/conformance/jsx/file.tsx(24,8): error TS2339: Property 'y' does not exist on type 'Attribs1'.
|
||||
tests/cases/conformance/jsx/file.tsx(25,8): error TS2339: Property 'y' does not exist on type 'Attribs1'.
|
||||
tests/cases/conformance/jsx/file.tsx(26,8): error TS2322: Type '{ x: "32"; }' is not assignable to type 'Attribs1'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type '"32"' is not assignable to type 'number'.
|
||||
tests/cases/conformance/jsx/file.tsx(27,8): error TS2322: Type '{ var: "10"; }' is not assignable to type 'Attribs1'.
|
||||
Property 'var' does not exist on type 'Attribs1'.
|
||||
tests/cases/conformance/jsx/file.tsx(27,8): error TS2339: Property 'var' does not exist on type 'Attribs1'.
|
||||
tests/cases/conformance/jsx/file.tsx(29,1): error TS2322: Type '{}' is not assignable to type '{ reqd: string; }'.
|
||||
Property 'reqd' is missing in type '{}'.
|
||||
tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type '{ reqd: 10; }' is not assignable to type '{ reqd: string; }'.
|
||||
|
@ -47,12 +44,10 @@ tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type '{ reqd: 10; }' i
|
|||
!!! error TS2322: Type '"0"' is not assignable to type 'number'.
|
||||
<test1 y={0} />; // Error, no property "y"
|
||||
~~~~~
|
||||
!!! error TS2322: Type '{ y: 0; }' is not assignable to type 'Attribs1'.
|
||||
!!! error TS2322: Property 'y' does not exist on type 'Attribs1'.
|
||||
!!! error TS2339: Property 'y' does not exist on type 'Attribs1'.
|
||||
<test1 y="foo" />; // Error, no property "y"
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ y: "foo"; }' is not assignable to type 'Attribs1'.
|
||||
!!! error TS2322: Property 'y' does not exist on type 'Attribs1'.
|
||||
!!! error TS2339: Property 'y' does not exist on type 'Attribs1'.
|
||||
<test1 x="32" />; // Error, "32" is not number
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ x: "32"; }' is not assignable to type 'Attribs1'.
|
||||
|
@ -60,8 +55,7 @@ tests/cases/conformance/jsx/file.tsx(30,8): error TS2322: Type '{ reqd: 10; }' i
|
|||
!!! error TS2322: Type '"32"' is not assignable to type 'number'.
|
||||
<test1 var="10" />; // Error, no 'var' property
|
||||
~~~~~~~~
|
||||
!!! error TS2322: Type '{ var: "10"; }' is not assignable to type 'Attribs1'.
|
||||
!!! error TS2322: Property 'var' does not exist on type 'Attribs1'.
|
||||
!!! error TS2339: Property 'var' does not exist on type 'Attribs1'.
|
||||
|
||||
<test2 />; // Error, missing reqd
|
||||
~~~~~~~~~
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
tests/cases/conformance/jsx/file.tsx(11,22): error TS2322: Type '{ bar: "world"; }' is not assignable to type 'IntrinsicAttributes & { ref?: string; }'.
|
||||
Property 'bar' does not exist on type 'IntrinsicAttributes & { ref?: string; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(11,22): error TS2339: Property 'bar' does not exist on type 'IntrinsicAttributes & { ref?: string; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/react.d.ts (0 errors) ====
|
||||
|
@ -28,7 +27,6 @@ tests/cases/conformance/jsx/file.tsx(11,22): error TS2322: Type '{ bar: "world";
|
|||
// Should be an OK
|
||||
var x = <MyComponent bar='world' />;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ bar: "world"; }' is not assignable to type 'IntrinsicAttributes & { ref?: string; }'.
|
||||
!!! error TS2322: Property 'bar' does not exist on type 'IntrinsicAttributes & { ref?: string; }'.
|
||||
!!! error TS2339: Property 'bar' does not exist on type 'IntrinsicAttributes & { ref?: string; }'.
|
||||
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(11,21): error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
|
||||
|
@ -15,8 +14,7 @@ tests/cases/conformance/jsx/file.tsx(11,21): error TS2322: Type '{ prop1: "hello
|
|||
// Error
|
||||
let a = <BigGreeter prop1="hello" />
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ prop1: "hello"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
!!! error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<BigGreeter> & { children?: ReactNode; }'.
|
||||
|
||||
// OK
|
||||
let b = <BigGreeter ref={(input) => { this.textInput = input; }} />
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
tests/cases/conformance/jsx/file.tsx(17,7): error TS2322: Type '{ x: 10; }' is not assignable to type '{ q?: number; }'.
|
||||
Property 'x' does not exist on type '{ q?: number; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(17,7): error TS2339: Property 'x' does not exist on type '{ q?: number; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
|
||||
|
@ -21,8 +20,7 @@ tests/cases/conformance/jsx/file.tsx(17,7): error TS2322: Type '{ x: 10; }' is n
|
|||
var Obj2: Obj2type;
|
||||
<Obj2 x={10} />; // Error
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ x: 10; }' is not assignable to type '{ q?: number; }'.
|
||||
!!! error TS2322: Property 'x' does not exist on type '{ q?: number; }'.
|
||||
!!! error TS2339: Property 'x' does not exist on type '{ q?: number; }'.
|
||||
|
||||
interface Obj3type {
|
||||
new(n: string): { x: number; };
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/conformance/jsx/file.tsx(12,7): error TS2322: Type '{ w: "err"; }' is not assignable to type '{ n: string; }'.
|
||||
Property 'w' does not exist on type '{ n: string; }'.
|
||||
Property 'n' is missing in type '{ w: "err"; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
|
||||
|
@ -17,4 +17,4 @@ tests/cases/conformance/jsx/file.tsx(12,7): error TS2322: Type '{ w: "err"; }' i
|
|||
<span w='err' />;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ w: "err"; }' is not assignable to type '{ n: string; }'.
|
||||
!!! error TS2322: Property 'w' does not exist on type '{ n: string; }'.
|
||||
!!! error TS2322: Property 'n' is missing in type '{ w: "err"; }'.
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/conformance/jsx/file.tsx(16,7): error TS2322: Type '{ q: ""; }' is not assignable to type '{ m: string; }'.
|
||||
Property 'q' does not exist on type '{ m: string; }'.
|
||||
Property 'm' is missing in type '{ q: ""; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (1 errors) ====
|
||||
|
@ -21,5 +21,5 @@ tests/cases/conformance/jsx/file.tsx(16,7): error TS2322: Type '{ q: ""; }' is n
|
|||
<span q='' />;
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ q: ""; }' is not assignable to type '{ m: string; }'.
|
||||
!!! error TS2322: Property 'q' does not exist on type '{ m: string; }'.
|
||||
!!! error TS2322: Property 'm' is missing in type '{ q: ""; }'.
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
tests/cases/conformance/jsx/file.tsx(16,17): error TS2322: Type '{ a: 10; b: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(17,18): error TS2322: Type '{ a: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(16,17): error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(17,18): error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (2 errors) ====
|
||||
|
@ -21,10 +19,8 @@ tests/cases/conformance/jsx/file.tsx(17,18): error TS2322: Type '{ a: "hi"; }' i
|
|||
|
||||
// Error
|
||||
let x = <MyComp a={10} b="hi" />
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ a: 10; b: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
~~~~~~
|
||||
!!! error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
let x2 = <MyComp a="hi"/>
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ a: "hi"; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
||||
!!! error TS2339: Property 'a' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<{}>> & { children?: ReactNode; }'.
|
|
@ -1,5 +1,6 @@
|
|||
tests/cases/conformance/jsx/file.tsx(12,22): error TS2322: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
|
||||
Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
|
||||
Type '{ extraProp: true; }' is not assignable to type '{ yy: number; yy1: string; }'.
|
||||
Property 'yy' is missing in type '{ extraProp: true; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(13,22): error TS2322: Type '{ yy: 10; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
|
||||
Type '{ yy: 10; }' is not assignable to type '{ yy: number; yy1: string; }'.
|
||||
Property 'yy1' is missing in type '{ yy: 10; }'.
|
||||
|
@ -28,9 +29,13 @@ tests/cases/conformance/jsx/file.tsx(34,29): error TS2322: Type '{ y1: "hello";
|
|||
Types of property 'y1' are incompatible.
|
||||
Type '"hello"' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/jsx/file.tsx(35,29): error TS2322: Type '{ y1: "hello"; y2: 1000; children: "hi"; }' is not assignable to type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'.
|
||||
Property 'children' does not exist on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'.
|
||||
Type '{ y1: "hello"; y2: 1000; children: "hi"; }' is not assignable to type '{ y1: boolean; y2?: number; y3: boolean; }'.
|
||||
Types of property 'y1' are incompatible.
|
||||
Type '"hello"' is not assignable to type 'boolean'.
|
||||
tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type '{ y1: "hello"; y2: 1000; children: string; }' is not assignable to type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'.
|
||||
Property 'children' does not exist on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'.
|
||||
Type '{ y1: "hello"; y2: 1000; children: string; }' is not assignable to type '{ y1: boolean; y2?: number; y3: boolean; }'.
|
||||
Types of property 'y1' are incompatible.
|
||||
Type '"hello"' is not assignable to type 'boolean'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (11 errors) ====
|
||||
|
@ -48,7 +53,8 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type '{ y1: "hello";
|
|||
const c0 = <OneThing extraProp />; // extra property;
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type '{ extraProp: true; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
|
||||
!!! error TS2322: Property 'extraProp' does not exist on type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
|
||||
!!! error TS2322: Type '{ extraProp: true; }' is not assignable to type '{ yy: number; yy1: string; }'.
|
||||
!!! error TS2322: Property 'yy' is missing in type '{ extraProp: true; }'.
|
||||
const c1 = <OneThing yy={10}/>; // missing property;
|
||||
~~~~~~~
|
||||
!!! error TS2322: Type '{ yy: 10; }' is not assignable to type 'IntrinsicAttributes & { yy: number; yy1: string; }'.
|
||||
|
@ -109,9 +115,13 @@ tests/cases/conformance/jsx/file.tsx(36,29): error TS2322: Type '{ y1: "hello";
|
|||
const e3 = <TestingOptional y1="hello" y2={1000} children="hi" />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ y1: "hello"; y2: 1000; children: "hi"; }' is not assignable to type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'.
|
||||
!!! error TS2322: Property 'children' does not exist on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'.
|
||||
!!! error TS2322: Type '{ y1: "hello"; y2: 1000; children: "hi"; }' is not assignable to type '{ y1: boolean; y2?: number; y3: boolean; }'.
|
||||
!!! error TS2322: Types of property 'y1' are incompatible.
|
||||
!!! error TS2322: Type '"hello"' is not assignable to type 'boolean'.
|
||||
const e4 = <TestingOptional y1="hello" y2={1000}>Hi</TestingOptional>
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ y1: "hello"; y2: 1000; children: string; }' is not assignable to type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'.
|
||||
!!! error TS2322: Property 'children' does not exist on type 'IntrinsicAttributes & { y1: boolean; y2?: number; y3: boolean; }'.
|
||||
!!! error TS2322: Type '{ y1: "hello"; y2: 1000; children: string; }' is not assignable to type '{ y1: boolean; y2?: number; y3: boolean; }'.
|
||||
!!! error TS2322: Types of property 'y1' are incompatible.
|
||||
!!! error TS2322: Type '"hello"' is not assignable to type 'boolean'.
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
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'.
|
||||
Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'.
|
||||
Type '{ to: "/some/path"; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'HyphenProps'.
|
||||
Property '"data-format"' is missing in type '{ to: "/some/path"; onClick: (e: MouseEvent<any>) => void; children: string; }'.
|
||||
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'.
|
||||
Type '{ to: string; onClick: (e: any) => void; children: string; }' is not assignable to type 'HyphenProps'.
|
||||
Property '"data-format"' is missing in type '{ to: string; onClick: (e: any) => void; children: string; }'.
|
||||
|
@ -75,7 +76,8 @@ tests/cases/conformance/jsx/file.tsx(56,24): error TS2322: Type '{ data-format:
|
|||
const b0 = <MainButton to='/some/path' onClick={(e)=>{}}>GO</MainButton>; // extra property;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ to: "/some/path"; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
|
||||
!!! error TS2322: Property 'to' does not exist on type 'IntrinsicAttributes & HyphenProps'.
|
||||
!!! error TS2322: Type '{ to: "/some/path"; onClick: (e: MouseEvent<any>) => void; children: string; }' is not assignable to type 'HyphenProps'.
|
||||
!!! error TS2322: Property '"data-format"' is missing in type '{ to: "/some/path"; onClick: (e: MouseEvent<any>) => void; children: string; }'.
|
||||
const b1 = <MainButton onClick={(e: any)=> {}} {...obj0}>Hello world</MainButton>; // extra property;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ to: string; onClick: (e: any) => void; children: string; }' is not assignable to type 'IntrinsicAttributes & HyphenProps'.
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
tests/cases/conformance/jsx/file.tsx(19,16): error TS2322: Type '{ naaame: "world"; }' is not assignable to type 'IntrinsicAttributes & { name: string; }'.
|
||||
Property 'naaame' does not exist on type 'IntrinsicAttributes & { name: string; }'.
|
||||
Type '{ naaame: "world"; }' is not assignable to type '{ name: string; }'.
|
||||
Property 'name' is missing in type '{ naaame: "world"; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(27,15): error TS2322: Type '{ name: 42; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
Type '{ name: 42; }' is not assignable to type '{ name?: string; }'.
|
||||
Types of property 'name' are incompatible.
|
||||
Type '42' is not assignable to type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(29,15): error TS2322: Type '{ naaaaaaame: "no"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(29,15): error TS2339: Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(34,23): error TS2322: Type '{}' is not assignable to type 'IntrinsicAttributes & { "prop-name": string; }'.
|
||||
Type '{}' is not assignable to type '{ "prop-name": string; }'.
|
||||
Property '"prop-name"' is missing in type '{}'.
|
||||
tests/cases/conformance/jsx/file.tsx(37,23): error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
Property 'prop1' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(38,24): error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
Property 'ref' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(37,23): error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(38,24): error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
|
||||
|
||||
|
||||
|
@ -38,7 +36,8 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
|
|||
let b = <Greet naaame='world' />;
|
||||
~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ naaame: "world"; }' is not assignable to type 'IntrinsicAttributes & { name: string; }'.
|
||||
!!! error TS2322: Property 'naaame' does not exist on type 'IntrinsicAttributes & { name: string; }'.
|
||||
!!! error TS2322: Type '{ naaame: "world"; }' is not assignable to type '{ name: string; }'.
|
||||
!!! error TS2322: Property 'name' is missing in type '{ naaame: "world"; }'.
|
||||
|
||||
// OK
|
||||
let c = <Meet />;
|
||||
|
@ -55,8 +54,7 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
|
|||
// Error
|
||||
let f = <Meet naaaaaaame='no' />;
|
||||
~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ naaaaaaame: "no"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
!!! error TS2322: Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
!!! error TS2339: Property 'naaaaaaame' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
|
||||
// OK
|
||||
let g = <MeetAndGreet prop-name="Bob" />;
|
||||
|
@ -70,12 +68,10 @@ tests/cases/conformance/jsx/file.tsx(41,16): error TS1005: ',' expected.
|
|||
// Error
|
||||
let i = <EmptyPropSFC prop1 />
|
||||
~~~~~
|
||||
!!! error TS2322: Type '{ prop1: true; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
|
||||
!!! error TS2339: Property 'prop1' does not exist on type 'IntrinsicAttributes'.
|
||||
let i1 = <EmptyPropSFC ref={x => x.greeting.substr(10)} />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ ref: (x: any) => any; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Property 'ref' does not exist on type 'IntrinsicAttributes'.
|
||||
!!! error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes'.
|
||||
|
||||
let o = {
|
||||
prop1: true;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
tests/cases/conformance/jsx/file.tsx(19,16): error TS2322: Type '{ ref: "myRef"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(19,16): error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(25,42): error TS2339: Property 'subtr' does not exist on type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(27,33): error TS2339: Property 'notARealProperty' does not exist on type 'BigGreeter'.
|
||||
tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNotOnHtmlDivElement' does not exist on type 'HTMLDivElement'.
|
||||
|
@ -26,8 +25,7 @@ tests/cases/conformance/jsx/file.tsx(35,26): error TS2339: Property 'propertyNot
|
|||
// Error - not allowed to specify 'ref' on SFCs
|
||||
let c = <Greet ref="myRef" />;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ ref: "myRef"; }' is not assignable to type 'IntrinsicAttributes & { name?: string; }'.
|
||||
!!! error TS2322: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
!!! error TS2339: Property 'ref' does not exist on type 'IntrinsicAttributes & { name?: string; }'.
|
||||
|
||||
|
||||
// OK - ref is valid for classes
|
||||
|
|
|
@ -3,10 +3,8 @@ tests/cases/conformance/jsx/file.tsx(32,17): error TS2322: Type '{ x: true; }' i
|
|||
Type '{ x: true; }' is not assignable to type '{ x: string; }'.
|
||||
Types of property 'x' are incompatible.
|
||||
Type 'true' is not assignable to type 'string'.
|
||||
tests/cases/conformance/jsx/file.tsx(33,21): error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(33,21): error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
tests/cases/conformance/jsx/file.tsx(34,22): error TS2339: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/file.tsx (3 errors) ====
|
||||
|
@ -50,10 +48,8 @@ tests/cases/conformance/jsx/file.tsx(34,22): error TS2322: Type '{ prop: true; }
|
|||
!!! error TS2322: Type 'true' is not assignable to type 'string'.
|
||||
let b = <PartRCComp x={10} />
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ x: 10; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
!!! error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC4> & { children?: ReactNode; }'.
|
||||
let c = <EmptyRCComp prop />;
|
||||
~~~~
|
||||
!!! error TS2322: Type '{ prop: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
!!! error TS2322: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
!!! error TS2339: Property 'prop' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RC3> & { children?: ReactNode; }'.
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
tests/cases/conformance/jsx/file.tsx(18,23): error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
Property 'x' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(18,23): error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes'.
|
||||
tests/cases/conformance/jsx/file.tsx(19,27): error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.
|
||||
Type '{ x: "hi"; }' is not assignable to type '{ x: boolean; }'.
|
||||
Types of property 'x' are incompatible.
|
||||
|
@ -32,8 +31,7 @@ tests/cases/conformance/jsx/file.tsx(21,27): error TS2322: Type '{}' is not assi
|
|||
// Error
|
||||
let a = <EmptySFCComp x />;
|
||||
~
|
||||
!!! error TS2322: Type '{ x: true; }' is not assignable to type 'IntrinsicAttributes'.
|
||||
!!! error TS2322: Property 'x' does not exist on type 'IntrinsicAttributes'.
|
||||
!!! error TS2339: Property 'x' does not exist on type 'IntrinsicAttributes'.
|
||||
let b = <SFC2AndEmptyComp x="hi" />;
|
||||
~~~~~~
|
||||
!!! error TS2322: Type '{ x: "hi"; }' is not assignable to type 'IntrinsicAttributes & { x: boolean; }'.
|
||||
|
|
Loading…
Reference in a new issue