@karmaniverous/jeeves
    Preparing search index...

    Interface PluginLifecycleApi

    Plugin-owned lifecycle API (subset of api.lifecycle).

    interface PluginLifecycleApi {
        onDispose?: (dispose: () => void | Promise<void>) => () => void;
        registerRuntimeLifecycle?: (
            registration: {
                description?: string;
                dispose?: () => void | Promise<void>;
                id: string;
            },
        ) => void;
        signal?: AbortSignal;
    }
    Index
    onDispose?: (dispose: () => void | Promise<void>) => () => void

    Register a disposer run when the plugin instance is retired.

    Type Declaration

      • (dispose: () => void | Promise<void>): () => void
      • Parameters

        • dispose: () => void | Promise<void>

        Returns () => void

        A function that unregisters the disposer.

    registerRuntimeLifecycle?: (
        registration: {
            description?: string;
            dispose?: () => void | Promise<void>;
            id: string;
        },
    ) => void

    Register named cleanup for plugin-owned background work.

    signal?: AbortSignal

    Aborted when the plugin instance is retired.