Sanity Library Reference Docs
    Preparing search index...

    Interface DocumentTypeHandle<TDocumentType, TDataset, TProjectId>

    Identifies a specific document type within a Sanity dataset and project. Includes projectId, dataset, and documentType. Optionally includes a documentId and liveEdit flag.

    interface DocumentTypeHandle<
        TDocumentType extends string = string,
        TDataset extends string = string,
        TProjectId extends string = string,
    > {
        dataset?: TDataset;
        documentId?: string;
        documentType: TDocumentType;
        liveEdit?: boolean;
        perspective?: ReleasePerspective | ClientPerspective;
        projectId?: TProjectId;
        source?: DocumentSource;
        sourceName?: string;
    }

    Type Parameters

    • TDocumentType extends string = string
    • TDataset extends string = string
    • TProjectId extends string = string

    Hierarchy (View Summary)

    Index

    Properties

    dataset?: TDataset
    documentId?: string
    documentType: TDocumentType
    liveEdit?: boolean

    Indicates whether this document uses liveEdit mode. When true, the document does not use the draft/published model and edits are applied directly to the document.

    perspective?: ReleasePerspective | ClientPerspective
    projectId?: TProjectId

    Explicit source object to use for this operation.

    sourceName?: string

    The name of the source to use for this operation.