Sanity Library Reference Docs
    Preparing search index...

    Type Alias SingletonListBuilder

    SingletonListBuilder: {
        [Key in keyof Omit<ListBuilder, "items">]: ListBuilder[Key] extends (
            ...args: infer Args,
        ) => ListBuilder
            ? (...args: Args) => SingletonListBuilder
            : ListBuilder[Key]
    }

    A ListBuilder with the items method removed at the type level.

    Returned by ListBuilder.singletons(): calling .items() afterwards would replace the whole items array and silently discard the singleton items, so the type prevents it. Call .items() before .singletons(), or use S.listItem().singleton() inside a regular .items() array, when mixing singletons with other items.

    The runtime object is a plain ListBuilder; only the declared type narrows. Chainable methods keep returning SingletonListBuilder so the omission cannot be undone by further chaining.