Function values

  • a schema that accepts records with arbitrary keys to the same value

    Type Parameters

    • const V
    • const S

    Parameters

    Returns CompiledSchema<Record<string, V>, {
        values: S;
    }>

    Example

    const schema = values(boolean());
    schema.guard({"a": false});