export interface ICompletableFuture extends Promise { readonly asCallback: (err: any, value?: T) => void; complete(value: T): boolean; completeExceptionally(throwable: Error): boolean; } export type CompletableFuture = ICompletableFuture & Promise; export default function future(): CompletableFuture;