Fixed definition for Rx.config.Promise;

Added test for promises;
This commit is contained in:
Igor Oleinikov
2014-03-18 10:46:14 +04:00
parent 3e29e44ddb
commit 920c290ae3
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -66,8 +66,12 @@ module Rx.Tests.Async {
new<T>(resolver: (resolvePromise: (value: T)=> void, rejectPromise: (reason: any)=> void)=> void): Rx.IPromise<T>;
};
Rx.config.Promise = promiseImpl;
var p: IPromise<number> = obsNum.toPromise(promiseImpl);
p = obsNum.toPromise();
p = p.then(x=> x);
p = p.then(x=> p);
p = p.then(undefined, reason=> 10);
+1 -1
View File
@@ -47,7 +47,7 @@ declare module Rx {
}
export module config {
export var Promise: { new <T>(resolve: (value: T) => void, reject: (reason: any) => void): IPromise<T>; };
export var Promise: { new <T>(resolver: (resolvePromise: (value: T) => void, rejectPromise: (reason: any) => void) => void): IPromise<T>; };
}
export interface IDisposable {