Sanity Library Reference Docs
    Preparing search index...

    Interface Schema

    interface Schema {
        get: (name: string) => SchemaType;
        getLocalTypeNames: () => string[];
        getTypeNames: () => string[];
        has: (name: string) => boolean;
        name: string;
        parent?: Schema;
    }
    Index

    Properties

    get: (name: string) => SchemaType
    getLocalTypeNames: () => string[]

    Returns the types which were explicitly defined in this schema, as opposed to the types which were inherited from the parent.

    getTypeNames: () => string[]
    has: (name: string) => boolean
    name: string
    parent?: Schema

    Returns the parent schema.