file.tsx(2,22): error TS7008: Member 'something' implicitly has an 'any' type.
file.tsx(11,2): error TS2769: No overload matches this call.
  Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
    Type '{}' is not assignable to type 'string'.
  Overload 2 of 2, '(n: number): { y: string; }', gave the following error.
    Type '{}' is not assignable to type 'number'.
file.tsx(18,2): error TS2769: No overload matches this call.
  Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
    Type '{}' is not assignable to type 'string'.
  Overload 2 of 2, '(n: number): { y: string; }', gave the following error.
    Type '{}' is not assignable to type 'number'.
file.tsx(18,2): error TS2786: 'Obj2' cannot be used as a JSX component.
  Its return type '{ x: number; } & { y: string; }' is not a valid JSX element.
file.tsx(25,2): error TS2769: No overload matches this call.
  Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
    Type '{ x: number; }' is not assignable to type 'string'.
  Overload 2 of 2, '(n: number): { x: number; y: string; }', gave the following error.
    Type '{ x: number; }' is not assignable to type 'number'.
file.tsx(25,2): error TS2786: 'Obj3' cannot be used as a JSX component.
  Its return type '{ x: number; } & { x: number; y: string; }' is not a valid JSX element.


==== file.tsx (6 errors) ====
    declare namespace JSX {
    	interface Element { something; }
    	                    ~~~~~~~~~
!!! error TS7008: Member 'something' implicitly has an 'any' type.
    	interface IntrinsicElements { }
    }
    
    interface Obj1 {
    	new(n: string): { x: number };
    	new(n: number): { y: string };
    }
    declare var Obj1: Obj1;
    <Obj1 />; // Error, return type is not an object type
     ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
!!! error TS2769:     Type '{}' is not assignable to type 'string'.
!!! error TS2769:   Overload 2 of 2, '(n: number): { y: string; }', gave the following error.
!!! error TS2769:     Type '{}' is not assignable to type 'number'.
    
    interface Obj2 {
    	(n: string): { x: number };
    	(n: number): { y: string };
    }
    declare var Obj2: Obj2;
    <Obj2 />; // Error, return type is not an object type
     ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
!!! error TS2769:     Type '{}' is not assignable to type 'string'.
!!! error TS2769:   Overload 2 of 2, '(n: number): { y: string; }', gave the following error.
!!! error TS2769:     Type '{}' is not assignable to type 'number'.
     ~~~~
!!! error TS2786: 'Obj2' cannot be used as a JSX component.
!!! error TS2786:   Its return type '{ x: number; } & { y: string; }' is not a valid JSX element.
    
    interface Obj3 {
    	(n: string): { x: number };
    	(n: number): { x: number; y: string };
    }
    declare var Obj3: Obj3;
    <Obj3 x={42} />; // OK
     ~~~~
!!! error TS2769: No overload matches this call.
!!! error TS2769:   Overload 1 of 2, '(n: string): { x: number; }', gave the following error.
!!! error TS2769:     Type '{ x: number; }' is not assignable to type 'string'.
!!! error TS2769:   Overload 2 of 2, '(n: number): { x: number; y: string; }', gave the following error.
!!! error TS2769:     Type '{ x: number; }' is not assignable to type 'number'.
     ~~~~
!!! error TS2786: 'Obj3' cannot be used as a JSX component.
!!! error TS2786:   Its return type '{ x: number; } & { x: number; y: string; }' is not a valid JSX element.
    