1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
=== tests/cases/conformance/jsx/file.tsx ===
interface Context {
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
color: any;
>color : Symbol(Context.color, Decl(file.tsx, 0, 19))
}
declare function ZeroThingOrTwoThing(): JSX.Element;
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function ZeroThingOrTwoThing(l: {yy: number, yy1: string}, context: Context): JSX.Element;
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
>l : Symbol(l, Decl(file.tsx, 4, 37))
>yy : Symbol(yy, Decl(file.tsx, 4, 41))
>yy1 : Symbol(yy1, Decl(file.tsx, 4, 52))
>context : Symbol(context, Decl(file.tsx, 4, 66))
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
let obj2: any;
>obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
// OK
const two1 = <ZeroThingOrTwoThing />;
>two1 : Symbol(two1, Decl(file.tsx, 9, 5))
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
const two2 = <ZeroThingOrTwoThing yy={100} yy1="hello"/>;
>two2 : Symbol(two2, Decl(file.tsx, 10, 5))
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
>yy : Symbol(yy, Decl(file.tsx, 10, 33))
>yy1 : Symbol(yy1, Decl(file.tsx, 10, 42))
const two3 = <ZeroThingOrTwoThing {...obj2} />; // it is just any so we allow it to pass through
>two3 : Symbol(two3, Decl(file.tsx, 11, 5))
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
>obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
const two4 = <ZeroThingOrTwoThing yy={1000} {...obj2} />; // it is just any so we allow it to pass through
>two4 : Symbol(two4, Decl(file.tsx, 12, 5))
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
>yy : Symbol(yy, Decl(file.tsx, 12, 33))
>obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
const two5 = <ZeroThingOrTwoThing {...obj2} yy={1000} />; // it is just any so we allow it to pass through
>two5 : Symbol(two5, Decl(file.tsx, 13, 5))
>ZeroThingOrTwoThing : Symbol(ZeroThingOrTwoThing, Decl(file.tsx, 2, 1), Decl(file.tsx, 3, 52))
>obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
>yy : Symbol(yy, Decl(file.tsx, 13, 44))
declare function ThreeThing(l: {y1: string}): JSX.Element;
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
>l : Symbol(l, Decl(file.tsx, 15, 28))
>y1 : Symbol(y1, Decl(file.tsx, 15, 32))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function ThreeThing(l: {y2: string}): JSX.Element;
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
>l : Symbol(l, Decl(file.tsx, 16, 28))
>y2 : Symbol(y2, Decl(file.tsx, 16, 32))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
declare function ThreeThing(l: {yy: number, yy1: string}, context: Context, updater: any): JSX.Element;
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
>l : Symbol(l, Decl(file.tsx, 17, 28))
>yy : Symbol(yy, Decl(file.tsx, 17, 32))
>yy1 : Symbol(yy1, Decl(file.tsx, 17, 43))
>context : Symbol(context, Decl(file.tsx, 17, 57))
>Context : Symbol(Context, Decl(file.tsx, 0, 0))
>updater : Symbol(updater, Decl(file.tsx, 17, 75))
>JSX : Symbol(JSX, Decl(react.d.ts, 2353, 1))
>Element : Symbol(JSX.Element, Decl(react.d.ts, 2356, 27))
// OK
const three1 = <ThreeThing yy={99} yy1="hello world" />;
>three1 : Symbol(three1, Decl(file.tsx, 20, 5))
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
>yy : Symbol(yy, Decl(file.tsx, 20, 26))
>yy1 : Symbol(yy1, Decl(file.tsx, 20, 34))
const three2 = <ThreeThing y2="Bye" />;
>three2 : Symbol(three2, Decl(file.tsx, 21, 5))
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
>y2 : Symbol(y2, Decl(file.tsx, 21, 26))
const three3 = <ThreeThing {...obj2} y2={10} />; // it is just any so we allow it to pass through
>three3 : Symbol(three3, Decl(file.tsx, 22, 5))
>ThreeThing : Symbol(ThreeThing, Decl(file.tsx, 13, 58), Decl(file.tsx, 15, 58), Decl(file.tsx, 16, 58))
>obj2 : Symbol(obj2, Decl(file.tsx, 6, 3))
>y2 : Symbol(y2, Decl(file.tsx, 22, 36))
|