UNPKG

eureca.io

Version:

Nodejs transparent bidirectional remote procedure call (RPC) supporting multiple transports : WebRTC, Websocket, engine.io, faye ...etc

21 lines (19 loc) 710 B
/** @ignore */ module Eureca { export class EurecaPromise<T> extends Promise<T>{ //public status=0; //public result:any = null; //public error: any = null; public sig: string = null; public resolve: any = null; public reject: any = null; constructor(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) { super(executor); } //cancel the operation public onReady(onfullfilled, onrejected) { console.warn('onReady() is deprecated, please use then() instead'); return this.then(onfullfilled, onrejected); } } }