@illavv/run_typer - v4.1.0
    Preparing search index...

    Type Alias OptionalSlot<V>

    OptionalSlot: V extends string
        ? V extends `${string}?` ? V : `${V}?`
        : V extends Validator<infer T>
            ? Validator<T | undefined>
            : Validator<ResolveSchemaValue<V> | undefined>

    One schema slot, made optional.

    A type-string slot gains the ? marker it already understands. Every other slot kind — a validator, an array, a nested schema — has no marker of its own in the schema language, so it becomes a validator that also accepts undefined, which Infer reads as an optional key just the same.

    Type Parameters

    • V

      The slot to make optional