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
|
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : Symbol(React, Decl(file.tsx, 0, 0))
const obj = {};
>obj : Symbol(obj, Decl(file.tsx, 2, 5))
const obj1 = {
>obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
x: 2
>x : Symbol(x, Decl(file.tsx, 3, 14))
}
const obj3 = {
>obj3 : Symbol(obj3, Decl(file.tsx, 6, 5))
y: true,
>y : Symbol(y, Decl(file.tsx, 6, 14))
overwrite: "hi"
>overwrite : Symbol(overwrite, Decl(file.tsx, 7, 12))
}
interface Prop {
>Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
x: number
>x : Symbol(Prop.x, Decl(file.tsx, 11, 16))
y: boolean
>y : Symbol(Prop.y, Decl(file.tsx, 12, 13))
overwrite: string
>overwrite : Symbol(Prop.overwrite, Decl(file.tsx, 13, 14))
}
class OverWriteAttr extends React.Component<Prop, {}> {
>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>React : Symbol(React, Decl(file.tsx, 0, 0))
>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55), Decl(react.d.ts, 161, 66))
>Prop : Symbol(Prop, Decl(file.tsx, 9, 1))
render() {
>render : Symbol(OverWriteAttr.render, Decl(file.tsx, 17, 55))
return <div>Hello</div>;
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
>div : Symbol(JSX.IntrinsicElements.div, Decl(react.d.ts, 2400, 45))
}
}
// OK
let x = <OverWriteAttr {...obj} y overwrite="hi" {...obj1} />
>x : Symbol(x, Decl(file.tsx, 24, 3))
>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
>obj : Symbol(obj, Decl(file.tsx, 2, 5))
>y : Symbol(y, Decl(file.tsx, 24, 31))
>overwrite : Symbol(overwrite, Decl(file.tsx, 24, 33))
>obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
let x1 = <OverWriteAttr {...obj1} {...obj3} />
>x1 : Symbol(x1, Decl(file.tsx, 25, 3))
>OverWriteAttr : Symbol(OverWriteAttr, Decl(file.tsx, 15, 1))
>obj1 : Symbol(obj1, Decl(file.tsx, 3, 5))
>obj3 : Symbol(obj3, Decl(file.tsx, 6, 5))
|