AnyToPromise
@tsed/core
Usage
typescript
import { AnyToPromise } from "@tsed/core";
Overview
ts
class AnyToPromise<T = any> {
status: AnyToPromiseStatus;
args: any[];
constructor({ hasNextFunction }?: {
hasNextFunction?: boolean;
});
isDone(): boolean;
get next(): (error?: any) => void;
call(cb: Function): Promise<AnyPromiseResult<T>>;
reject(er: any): void;
resolve(response?: any): void;
destroy(): void;
cancel(): any;
done(status: AnyToPromiseStatus): void;
handle(process: any, additionalProps?: {}): any;
protected isCanceledResponse(process: any): boolean;
}
status
ts
status: AnyToPromiseStatus;
args
ts
args: any[];
isDone
ts
isDone(): boolean;
get next
ts
get next(): (error?: any) => void;
call
ts
call(cb: Function): Promise<AnyPromiseResult<T>>;
reject
ts
reject(er: any): void;
resolve
ts
resolve(response?: any): void;
destroy
ts
destroy(): void;
cancel
ts
cancel(): any;
done
ts
done(status: AnyToPromiseStatus): void;
handle
ts
handle(process: any, additionalProps?: {}): any;
protected isCanceledResponse
ts
protected isCanceledResponse(process: any): boolean;