SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface CommandScopeSpec<T>

    The declarative form accepted by CommandScopeProvider in place of a pre-built scope: "create a scopeName child of the container's ambient scope, run the contributor's dynamic half on it for its lifetime, and provide it." DRYs the create-child + contribute + provide boilerplate. The scope tree mirrors the container tree because the child is created off useCommandScope.

    interface CommandScopeSpec<T = any> {
        contributor?: CommandContributor<T>;
        data?: T;
        scopeName: string | { key: string; name?: string };
    }

    Type Parameters

    • T = any
    Index
    contributor?: CommandContributor<T>

    The feature's contributor; its dynamic half runs on the created scope (its static half is seeded elsewhere). Optional: a scope can exist purely as a named region that OTHERS contribute into (the script editor's, contributed by its toolbar and its editor commands) — the create/dispose/region plumbing is the same either way.

    data?: T

    The single per-instance context bundle passed to dynamic. Memoize it — a new object re-runs it.

    scopeName: string | { key: string; name?: string }

    The child's tree key (or { key, name } when the registry name differs from the key).