//// [promiseIdentityWithAny2.ts] interface IPromise { then(callback: (x: T) => IPromise): IPromise; } interface Promise { then(callback: (x: T) => Promise): Promise; } // Error because type parameter arity doesn't match var x: IPromise; var x: Promise; interface IPromise2 { then(callback: (x: T) => IPromise2): IPromise2; } interface Promise2 { then(callback: (x: T) => Promise2): Promise2; // Uses string instead of any! } // Error because string and any don't match var y: IPromise2; var y: Promise2; //// [promiseIdentityWithAny2.js] // Error because type parameter arity doesn't match var x; var x; // Error because string and any don't match var y; var y;