//@filename: file.tsx //@jsx: preserve declare module JSX { interface Element { } interface IntrinsicElements { test1: Attribs1; test2: Attribs2; } } interface Attribs1 { x: string; } interface Attribs2 { toString(): string; } function make1 (obj: T) { return ; // OK } function make2 (obj: T) { return ; // Error (x is number, not string) } function make3 (obj: T) { return ; // Error, missing x } ; // Error, missing x ; // Error, missing toString