* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly * wip - just resolve to any type for now * Resolve string type to anytype and look up property in intrinsicElementsType of Jsx * Add tests and update baselines * Remove unneccessary comment * wip-address PR * Address PR * Add tets and update baselines * Fix linting error
26 lines
842 B
Text
26 lines
842 B
Text
=== tests/cases/conformance/jsx/tsxDynamicTagName6.tsx ===
|
|
|
|
declare module JSX {
|
|
>JSX : Symbol(JSX, Decl(tsxDynamicTagName6.tsx, 0, 0))
|
|
|
|
interface Element { }
|
|
>Element : Symbol(Element, Decl(tsxDynamicTagName6.tsx, 1, 20))
|
|
|
|
interface IntrinsicElements {
|
|
>IntrinsicElements : Symbol(IntrinsicElements, Decl(tsxDynamicTagName6.tsx, 2, 22))
|
|
|
|
div: any
|
|
>div : Symbol(IntrinsicElements.div, Decl(tsxDynamicTagName6.tsx, 3, 30))
|
|
}
|
|
}
|
|
|
|
const t = {tag:'h1'}
|
|
>t : Symbol(t, Decl(tsxDynamicTagName6.tsx, 8, 5))
|
|
>tag : Symbol(tag, Decl(tsxDynamicTagName6.tsx, 8, 11))
|
|
|
|
const foo = <t.tag/> // No error
|
|
>foo : Symbol(foo, Decl(tsxDynamicTagName6.tsx, 9, 5))
|
|
>t.tag : Symbol(tag, Decl(tsxDynamicTagName6.tsx, 8, 11))
|
|
>t : Symbol(t, Decl(tsxDynamicTagName6.tsx, 8, 5))
|
|
>tag : Symbol(tag, Decl(tsxDynamicTagName6.tsx, 8, 11))
|
|
|