mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-18 20:37:14 +08:00
Fixed angularjs promises then signature.
This commit is contained in:
@@ -387,9 +387,11 @@ module TestPromise {
|
||||
|
||||
var tresult: TResult;
|
||||
var tresultPromise: ng.IPromise<TResult>;
|
||||
var tresultHttpPromise: ng.IHttpPromise<TResult>;
|
||||
|
||||
var tother: TOther;
|
||||
var totherPromise: ng.IPromise<TOther>;
|
||||
var totherHttpPromise: ng.IHttpPromise<TOther>;
|
||||
|
||||
var promise: angular.IPromise<TResult>;
|
||||
|
||||
@@ -404,6 +406,9 @@ module TestPromise {
|
||||
result = <angular.IPromise<TResult>>promise.then((result) => tresultPromise);
|
||||
result = <angular.IPromise<TResult>>promise.then((result) => tresultPromise, (any) => any);
|
||||
result = <angular.IPromise<TResult>>promise.then((result) => tresultPromise, (any) => any, (any) => any);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TResult>>>promise.then((result) => tresultHttpPromise);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TResult>>>promise.then((result) => tresultHttpPromise, (any) => any);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TResult>>>promise.then((result) => tresultHttpPromise, (any) => any, (any) => any);
|
||||
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => tother);
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => tother, (any) => any);
|
||||
@@ -411,11 +416,18 @@ module TestPromise {
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => totherPromise);
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => totherPromise, (any) => any);
|
||||
result = <angular.IPromise<TOther>>promise.then((result) => totherPromise, (any) => any, (any) => any);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TOther>>>promise.then((result) => totherHttpPromise);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TOther>>>promise.then((result) => totherHttpPromise, (any) => any);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TOther>>>promise.then((result) => totherHttpPromise, (any) => any, (any) => any);
|
||||
|
||||
// promise.catch
|
||||
result = <angular.IPromise<any>>promise.catch((err) => any);
|
||||
result = <angular.IPromise<TResult>>promise.catch((err) => tresult);
|
||||
result = <angular.IPromise<TResult>>promise.catch((err) => tresultPromise);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TResult>>>promise.catch((err) => tresultHttpPromise);
|
||||
result = <angular.IPromise<TOther>>promise.catch((err) => tother);
|
||||
result = <angular.IPromise<TOther>>promise.catch((err) => totherPromise);
|
||||
result = <angular.IPromise<ng.IHttpPromiseCallbackArg<TOther>>>promise.catch((err) => totherHttpPromise);
|
||||
|
||||
// promise.finally
|
||||
result = <angular.IPromise<TResult>>promise.finally(() => any);
|
||||
|
||||
Reference in New Issue
Block a user