57 lines
1,022 B
Plaintext
57 lines
1,022 B
Plaintext
=== tests/cases/conformance/jsx/tsxElementResolution.tsx ===
|
|
|
|
declare namespace JSX {
|
|
>JSX : any
|
|
|
|
interface IntrinsicElements {
|
|
>IntrinsicElements : IntrinsicElements
|
|
|
|
foundFirst: { x: string };
|
|
>foundFirst : { x: string; }
|
|
>x : string
|
|
|
|
'string_named';
|
|
'var';
|
|
}
|
|
}
|
|
|
|
class foundFirst { }
|
|
>foundFirst : foundFirst
|
|
|
|
class Other {}
|
|
>Other : Other
|
|
|
|
module Dotted {
|
|
>Dotted : typeof Dotted
|
|
|
|
export class Name { }
|
|
>Name : Name
|
|
}
|
|
|
|
// Should find the intrinsic element, not the class element
|
|
var a = <foundFirst x="hello" />;
|
|
>a : any
|
|
><foundFirst x="hello" /> : any
|
|
>foundFirst : typeof foundFirst
|
|
>x : any
|
|
|
|
var b = <string_named />;
|
|
>b : any
|
|
><string_named /> : any
|
|
>string_named : any
|
|
|
|
// TODO: This should not be a parse error (should
|
|
// parse a property name here, not identifier)
|
|
// var c = <var />;
|
|
var d = <Other />;
|
|
>d : any
|
|
><Other /> : any
|
|
>Other : typeof Other
|
|
|
|
var e = <Dotted.Name />;
|
|
>e : any
|
|
><Dotted.Name /> : any
|
|
>Dotted : any
|
|
>Name : any
|
|
|