// @target: es2015
//@filename: file.tsx
//@jsx: preserve
declare namespace JSX {
	interface Element { }
	interface ElementAttributesProperty { pr: any; }
	interface IntrinsicElements { }
}

interface Obj1type {
	new(n: string): any;
}
declare var Obj1: Obj1type;
<Obj1 x={10} />; // OK

interface Obj2type {
	new(n: string): { q?: number; pr: any };
}
declare var Obj2: Obj2type;
<Obj2 x={10} />; // OK

interface Obj3type {
	new(n: string): { x: number; };
}
declare var Obj3: Obj3type;
<Obj3 x={10} />; // Error
var attributes: any;
<Obj3 {...attributes} />; // Error
<Obj3 {...{}} />; // OK

interface Obj4type {
	new(n: string): { x: number; pr: { x: number; } };
}
declare var Obj4: Obj4type;
<Obj4 x={10} />; // OK
<Obj4 x={'10'} />; // Error
