TypeScript/tests/baselines/reference/tsxElementResolution8.errors.txt
Ryan Cavanaugh 25553446ef Misc cleanup
2015-06-22 10:31:00 -07:00

50 lines
1.7 KiB
Plaintext

tests/cases/conformance/jsx/tsxElementResolution8.tsx(8,2): error TS2604: JSX element type 'Div' does not have any construct or call signatures.
tests/cases/conformance/jsx/tsxElementResolution8.tsx(16,2): error TS2601: The return type of a JSX element constructor must return an object type.
tests/cases/conformance/jsx/tsxElementResolution8.tsx(29,2): error TS2601: The return type of a JSX element constructor must return an object type.
tests/cases/conformance/jsx/tsxElementResolution8.tsx(34,2): error TS2604: JSX element type 'Obj3' does not have any construct or call signatures.
==== tests/cases/conformance/jsx/tsxElementResolution8.tsx (4 errors) ====
declare module JSX {
interface Element { }
interface IntrinsicElements { }
}
// Error
var Div = 3;
<Div />;
~~~
!!! error TS2604: JSX element type 'Div' does not have any construct or call signatures.
// OK
function Fact(): any { return null; }
<Fact />
// Error
function Fnum(): number{ return 42; }
<Fnum />
~~~~
!!! error TS2601: The return type of a JSX element constructor must return an object type.
interface Obj1 {
new(): {};
(): number;
}
var Obj1: Obj1;
<Obj1 />; // OK, prefer construct signatures
interface Obj2 {
(): number;
}
var Obj2: Obj2;
<Obj2 />; // Error
~~~~
!!! error TS2601: The return type of a JSX element constructor must return an object type.
interface Obj3 {
}
var Obj3: Obj3;
<Obj3 />; // Error
~~~~
!!! error TS2604: JSX element type 'Obj3' does not have any construct or call signatures.