Sanity Library Reference Docs
    Preparing search index...

    Interface DocumentActionKeys

    Registry of document action keys. Extend via declaration merging to register a custom action key. Use never as the value type; the values are unused, and indexed access (DocumentActionKeys[K]) is not part of the public contract.

    declare module 'sanity' {
    interface DocumentActionKeys {
    myPlugin: never
    }
    }

    Once registered, MyAction.action = 'myPlugin' type-checks, and other plugins can target the action for replacement.

    To match only Sanity-defined actions exhaustively, narrow with isSanityDefinedAction.

    interface DocumentActionKeys {
        delete: never;
        discardChanges: never;
        discardVersion: never;
        duplicate: never;
        editInCanvas: never;
        linkToCanvas: never;
        publish: never;
        restore: never;
        schedule: never;
        unlinkFromCanvas: never;
        unpublish: never;
        unpublishVersion: never;
    }

    Hierarchy

    Index

    Properties

    delete: never
    discardChanges: never
    discardVersion: never
    duplicate: never
    editInCanvas: never
    linkToCanvas: never
    publish: never
    restore: never
    schedule: never
    unlinkFromCanvas: never
    unpublish: never
    unpublishVersion: never