@vivliostyle/core
    Preparing search index...

    Interface Result<T>

    Result of an asynchronous function that may be available immediately or some time later. Similar to Deferred.

    interface Result<T> {
        get(): T;
        isPending(): boolean;
        then(callback: (p1: T) => void): void;
        thenAsync<T1>(callback: (p1: T) => Result<T1>): Result<T1>;
        thenFinish(frame: Frame<T>): void;
        thenReturn<T1>(result: T1): Result<T1>;
    }

    Type Parameters

    • T

    Implemented by

    Index

    Methods

    • Call the given function when asynchronous function is finished. Callback is executed in the task's context.

      Parameters

      • callback: (p1: T) => void

      Returns void