declare module Windows.Foundation { export interface IPromise { then(success?: (value: T) => IPromise, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; then(success?: (value: T) => IPromise, error?: (error: any) => U, progress?: (progress: any) => void ): Windows.Foundation.IPromise; then(success?: (value: T) => U, error?: (error: any) => IPromise, progress?: (progress: any) => void ): Windows.Foundation.IPromise; then(success?: (value: T) => U, error?: (error: any) => U, progress?: (progress: any) => void ): Windows.Foundation.IPromise; done? (success?: (value: T) => any, error?: (error: any) => any, progress?: (progress: any) => void ): void; } } var p: Windows.Foundation.IPromise = null; p.then(function (x) { } ); // should not error p.then(function (x) { return "hello"; } ).then(function (x) { return x } ); // should not error