Function elements

  • a schema that accepts arrays of elements

    Type Parameters

    • const E
    • const S

    Parameters

    Returns CompiledSchema<E[], {
        elements: S;
    }>

    Example

    const schema = elements(boolean());
    schema.guard([true]);