2014-07-13 01:04:16 +02:00
|
|
|
//// [bestCommonTypeReturnStatement.ts]
|
|
|
|
interface IPromise<T> {
|
|
|
|
then(successCallback: (promiseValue: T) => any, errorCallback?: (reason: any) => any): IPromise<any>;
|
|
|
|
}
|
|
|
|
|
|
|
|
function f() {
|
|
|
|
if (true) return b();
|
|
|
|
return d();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function b(): IPromise<void> { return null; }
|
|
|
|
function d(): IPromise<any> { return null; }
|
|
|
|
|
|
|
|
//// [bestCommonTypeReturnStatement.js]
|
|
|
|
function f() {
|
|
|
|
if (true)
|
|
|
|
return b();
|
|
|
|
return d();
|
|
|
|
}
|
2015-02-07 05:03:24 +01:00
|
|
|
function b() { return null; }
|
|
|
|
function d() { return null; }
|