IFClite TypeScript API
    Preparing search index...

    Interface LifetimeOptions<T, A>

    interface LifetimeOptions<T, A extends unknown[]> {
        release?: (value: T) => void;
        start: (attempt: LifetimeAttempt, ...args: A) => Promise<T>;
        supersededError?: () => Error;
    }

    Type Parameters

    • T
    • A extends unknown[]
    Index
    release?: (value: T) => void

    Free a value that is disposed, reset, or built by a superseded attempt.

    start: (attempt: LifetimeAttempt, ...args: A) => Promise<T>

    Build the resource. args are the ones the init() that started this attempt got.

    supersededError?: () => Error

    Rejection for an attempt a dispose() overtook.