W3cubDocs

/Haxe JavaScript

Promise<T>

package js

Available on js

Constructor

new (init:T ‑> Void ‑> Dynamic ‑> Void ‑> Void)

Throws:

null DOMError

Methods

catchError<TOut> (rejectCallback:EitherType<Dynamic ‑> Void, PromiseCallback<Dynamic, TOut>>):Promise<TOut>

then<TOut> (fulfillCallback:Null<PromiseCallback<T, TOut>>, ?rejectCallback:EitherType<Dynamic ‑> Void, PromiseCallback<Dynamic, TOut>>):Promise<TOut>

Static methods

static all (iterable:Array<Dynamic>):Promise<Array<Dynamic>>

static race (iterable:Array<Dynamic>):Promise<Dynamic>

static reject<T> (?value:Dynamic):Promise<T>

static resolve<T> (?value:T ):Promise<T>

static resolve<T> (promise:Promise<T>):Promise<T>

static resolve<T> (thenable:Thenable<T>):Promise<T>

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/Promise.html