Sanity Library Reference Docs
    Preparing search index...

    Type Alias InferStrictComponents<T>

    InferStrictComponents: PortableTextInferStrictComponents<StegaAware<T>>

    Infer Portable Text components from a value type, requiring handlers for all custom object types and disallowing extra custom object type handlers.

    Stega-aware version of InferStrictComponents from @portabletext/react, see InferComponents for how stega branding is handled.

    This is used the same way as InferComponents, but serves a different purpose: InferComponents is forgiving and mirrors the inline <PortableText components={...} /> experience, allowing custom handlers to be omitted and allowing handlers for types that do not exist in, or could not be inferred from, the value type. InferStrictComponents is strict: it requires inferred custom handlers and rejects unknown ones.

    Type Parameters

    • T