Sanity Library Reference Docs
    Preparing search index...

    Interface ResourceRef<Type>

    A resource that options of other resources can reference: the resource that a definer such as defineProject returns, or a resource in another stack from a referencer such as referenceProject.

    Options that take a ResourceRef also take a string, such as a $.resources.<name> reference or an ID. The definer turns the resource into a $.resources.<name> reference.

    interface ResourceRef<Type extends string = string> {
        name: string;
        type: Type;
    }

    Type Parameters

    • Type extends string = string

      The type of the resource, for example sanity.project

    Index

    Properties

    Properties

    name: string

    The name of the resource in the blueprint

    type: Type

    The type of the resource, for example sanity.project