/third_party/typescript/tests/baselines/reference/ |
D | tsxTypeArgumentResolution.types | 5 interface Prop { 23 let x = <MyComp<Prop> a={10} b="hi" />; // OK 25 ><MyComp<Prop> a={10} b="hi" /> : JSX.Element 31 x = <MyComp<Prop> a={10} b="hi"></MyComp>; // OK 32 >x = <MyComp<Prop> a={10} b="hi"></MyComp> : JSX.Element 34 ><MyComp<Prop> a={10} b="hi"></MyComp> : JSX.Element 41 x = <MyComp<Prop> a={10} b={20} />; // error 42 >x = <MyComp<Prop> a={10} b={20} /> : JSX.Element 44 ><MyComp<Prop> a={10} b={20} /> : JSX.Element 51 x = <MyComp<Prop> a={10} b={20}></MyComp>; // error [all …]
|
D | tsxTypeArgumentResolution.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) 12 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 28 let x = <MyComp<Prop> a={10} b="hi" />; // OK 31 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 35 x = <MyComp<Prop> a={10} b="hi"></MyComp>; // OK 38 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 43 x = <MyComp<Prop> a={10} b={20} />; // error 46 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) [all …]
|
D | checkJsxChildrenProperty2.types | 5 interface Prop { 17 function Comp(p: Prop) { 18 >Comp : (p: Prop) => JSX.Element 19 >p : Prop 25 >p : Prop 34 >Comp : (p: Prop) => JSX.Element 44 >Comp : (p: Prop) => JSX.Element 52 >Comp : (p: Prop) => JSX.Element 67 >Comp : (p: Prop) => JSX.Element 75 >Comp : (p: Prop) => JSX.Element [all …]
|
D | tsxTypeArgumentResolution.errors.txt | 7 tests/cases/conformance/jsx/file.tsx(39,14): error TS2344: Type 'Prop' does not satisfy the constra… 10 tests/cases/conformance/jsx/file.tsx(41,14): error TS2344: Type 'Prop' does not satisfy the constra… 20 interface Prop { 29 let x = <MyComp<Prop> a={10} b="hi" />; // OK 31 x = <MyComp<Prop> a={10} b="hi"></MyComp>; // OK 33 x = <MyComp<Prop> a={10} b={20} />; // error 36 …d here on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<Prop>> & Prop & { children?:… 38 x = <MyComp<Prop> a={10} b={20}></MyComp>; // error 41 …d here on type 'IntrinsicAttributes & IntrinsicClassAttributes<MyComp<Prop>> & Prop & { children?:… 43 x = <MyComp<Prop, Prop> a={10} b="hi" />; // error [all …]
|
D | tsxTypeArgumentResolution.js | 4 interface Prop { 13 let x = <MyComp<Prop> a={10} b="hi" />; // OK 15 x = <MyComp<Prop> a={10} b="hi"></MyComp>; // OK 17 x = <MyComp<Prop> a={10} b={20} />; // error 19 x = <MyComp<Prop> a={10} b={20}></MyComp>; // error 21 x = <MyComp<Prop, Prop> a={10} b="hi" />; // error 23 x = <MyComp<Prop, Prop> a={10} b="hi"></MyComp>; // error 40 x = <MyComp2<Prop> a={10} b="hi" />; // error 42 x = <MyComp2<Prop> a={10} b="hi"></MyComp2>; // error 48 x = <MyComp2<{a: string}, {b: string}, Prop> a="hi" b="hi" />; // error [all …]
|
D | checkJsxChildrenProperty8.types | 5 interface Prop { 45 function Comp(p: Prop) { 46 >Comp : (p: Prop) => JSX.Element 47 >p : Prop 53 >p : Prop 62 >Comp : (p: Prop) => JSX.Element 70 >Comp : (p: Prop) => JSX.Element 75 >Comp : (p: Prop) => JSX.Element 85 >Comp : (p: Prop) => JSX.Element 90 >Comp : (p: Prop) => JSX.Element [all …]
|
D | checkJsxChildrenProperty6.types | 5 interface Prop { 45 function Comp(p: Prop) { 46 >Comp : (p: Prop) => JSX.Element 47 >p : Prop 53 >p : Prop 64 >Comp : (p: Prop) => JSX.Element 78 >Comp : (p: Prop) => JSX.Element 85 >Comp : (p: Prop) => JSX.Element 101 >Comp : (p: Prop) => JSX.Element 106 >Comp : (p: Prop) => JSX.Element [all …]
|
D | checkJsxChildrenProperty1.types | 5 interface Prop { 17 function Comp(p: Prop) { 18 >Comp : (p: Prop) => JSX.Element 19 >p : Prop 25 >p : Prop 34 >Comp : (p: Prop) => JSX.Element 45 >Comp : (p: Prop) => JSX.Element 52 >Comp : (p: Prop) => JSX.Element 59 >Comp : (p: Prop) => JSX.Element 70 >Comp : (p: Prop) => JSX.Element
|
D | checkJsxChildrenProperty1.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) 12 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 15 >children : Symbol(Prop.children, Decl(file.tsx, 4, 14)) 20 function Comp(p: Prop) { 23 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 27 >p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 29 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
D | checkJsxChildrenProperty5.types | 5 interface Prop { 33 function Comp(p: Prop) { 34 >Comp : (p: Prop) => JSX.Element 35 >p : Prop 41 >p : Prop 50 >Comp : (p: Prop) => JSX.Element 61 >Comp : (p: Prop) => JSX.Element 71 >Comp : (p: Prop) => JSX.Element 78 >Comp : (p: Prop) => JSX.Element 87 >Comp : (p: Prop) => JSX.Element
|
D | checkJsxChildrenProperty7.types | 5 interface Prop { 45 function Comp(p: Prop) { 46 >Comp : (p: Prop) => JSX.Element 47 >p : Prop 53 >p : Prop 62 >Comp : (p: Prop) => JSX.Element 70 >Comp : (p: Prop) => JSX.Element 75 >Comp : (p: Prop) => JSX.Element 85 >Comp : (p: Prop) => JSX.Element 90 >Comp : (p: Prop) => JSX.Element [all …]
|
D | jsxCheckJsxNoTypeArgumentsAllowed.symbols | 18 export interface Prop { 19 >Prop : Symbol(Prop, Decl(component.d.ts, 3, 1)) 22 >a : Symbol(Prop.a, Decl(component.d.ts, 5, 23)) 25 >b : Symbol(Prop.b, Decl(component.d.ts, 6, 14)) 29 import { MyComp, Prop } from "./component"; 31 >Prop : Symbol(Prop, Decl(file.jsx, 0, 16)) 36 let x = <MyComp<Prop> a={10} b="hi" />; // error, no type arguments in js
|
D | checkJsxChildrenProperty5.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) 12 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 15 >children : Symbol(Prop.children, Decl(file.tsx, 4, 14)) 34 function Comp(p: Prop) { 37 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 41 >p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 43 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
D | tsxReactComponentWithDefaultTypeParameter1.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) 12 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 15 declare class MyComp<P = Prop> extends React.Component<P, {}> { 18 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
D | tsxReactComponentWithDefaultTypeParameter2.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) 12 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 15 declare class MyComp<P = Prop> extends React.Component<P, {}> { 18 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
D | tsxReactComponentWithDefaultTypeParameter3.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) 12 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 15 declare class MyComp<P extends Prop> extends React.Component<P, {}> { 18 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
D | tsxSpreadAttributesResolution8.symbols | 24 interface Prop { 25 >Prop : Symbol(Prop, Decl(file.tsx, 9, 1)) 28 >x : Symbol(Prop.x, Decl(file.tsx, 11, 16)) 31 >y : Symbol(Prop.y, Decl(file.tsx, 12, 13)) 34 >overwrite : Symbol(Prop.overwrite, Decl(file.tsx, 13, 14)) 37 class OverWriteAttr extends React.Component<Prop, {}> { 42 >Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
|
D | tsxDefaultAttributesResolution2.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >x : Symbol(Prop.x, Decl(file.tsx, 2, 16)) 11 class Poisoned extends React.Component<Prop, {}> { 16 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
D | tsxDefaultAttributesResolution3.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >x : Symbol(Prop.x, Decl(file.tsx, 2, 16)) 11 class Poisoned extends React.Component<Prop, {}> { 16 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
D | jsxCheckJsxNoTypeArgumentsAllowed.types | 15 export interface Prop { 24 import { MyComp, Prop } from "./component"; 26 >Prop : any 31 let x = <MyComp<Prop> a={10} b="hi" />; // error, no type arguments in js 33 ><MyComp<Prop> a={10} b="hi" />; // error, no type arguments in js : JSX.Element 36 ><Prop> a={10} b="hi" />; // error, no type arguments in js : JSX.Element 37 >Prop : any
|
D | tsxDefaultAttributesResolution1.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >x : Symbol(Prop.x, Decl(file.tsx, 2, 16)) 11 class Poisoned extends React.Component<Prop, {}> { 16 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32))
|
D | checkJsxChildrenProperty7.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) 12 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 15 >children : Symbol(Prop.children, Decl(file.tsx, 4, 14)) 46 function Comp(p: Prop) { 49 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 53 >p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 55 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
D | checkJsxChildrenProperty8.symbols | 5 interface Prop { 6 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 9 >a : Symbol(Prop.a, Decl(file.tsx, 2, 16)) 12 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 15 >children : Symbol(Prop.children, Decl(file.tsx, 4, 14)) 46 function Comp(p: Prop) { 49 >Prop : Symbol(Prop, Decl(file.tsx, 0, 32)) 53 >p.b : Symbol(Prop.b, Decl(file.tsx, 3, 14)) 55 >b : Symbol(Prop.b, Decl(file.tsx, 3, 14))
|
D | checkJsxChildrenProperty14.types | 5 interface Prop { 45 function Comp(p: Prop) { 46 >Comp : (p: Prop) => JSX.Element 47 >p : Prop 53 >p : Prop 62 >Comp : (p: Prop) => JSX.Element 71 >Comp : (p: Prop) => JSX.Element 76 >Comp : (p: Prop) => JSX.Element 85 >Comp : (p: Prop) => JSX.Element 90 >Comp : (p: Prop) => JSX.Element [all …]
|
/third_party/typescript/tests/cases/conformance/jsx/ |
D | tsxTypeArgumentResolution.tsx | 9 interface Prop { 18 let x = <MyComp<Prop> a={10} b="hi" />; // OK 20 x = <MyComp<Prop> a={10} b="hi"></MyComp>; // OK 22 x = <MyComp<Prop> a={10} b={20} />; // error 24 x = <MyComp<Prop> a={10} b={20}></MyComp>; // error 26 x = <MyComp<Prop, Prop> a={10} b="hi" />; // error 28 x = <MyComp<Prop, Prop> a={10} b="hi"></MyComp>; // error 45 x = <MyComp2<Prop> a={10} b="hi" />; // error 47 x = <MyComp2<Prop> a={10} b="hi"></MyComp2>; // error 53 x = <MyComp2<{a: string}, {b: string}, Prop> a="hi" b="hi" />; // error [all …]
|