Asap

This interface defines the helper methods around a Conan Asap

export interface Asap<T> {
    catch(error: IConsumer<Error>): this;

    then(consumer: IConsumer<T>): this;

    onCancel(consumer: ICallback): this;

    map<Z>(mapper: IFunction<T, Z>): Asap<Z>;

    chain<Z>(chainProducer: IFunction<T, Asap<Z>>): Asap<Z>;

    type: AsapType;

    cancel(): boolean;
}

catch

it will be invoked when an error is thrown while resolving the Asap's Promise

then

‌it will be invoked when the Asap's Promise is resolved

chain<Z>

‌allows chaning Asaps

map<Z>

‌maps an Asap into a another one

map<Z>

‌maps an Asap into a another one

cancel

‌cancels an Asap

Last updated