BUPKIS
    Preparing search index...

    Variable SyncIterableSchemaConst

    SyncIterableSchema: ZodCustom<
        Iterable<unknown, any, any>,
        Iterable<unknown, any, any>,
    > = ...

    Schema matching any synchronous iterable (has Symbol.iterator method).

    This schema validates values that implement the synchronous iteration protocol, meaning they have a Symbol.iterator method that returns an iterator. This includes arrays, strings, Sets, Maps, generators, and custom iterable objects.

    SyncIterableSchema.parse([1, 2, 3]); // ✓ Valid (array)
    SyncIterableSchema.parse('hello'); // ✓ Valid (string)
    SyncIterableSchema.parse(new Set()); // ✓ Valid (Set)
    SyncIterableSchema.parse(new Map()); // ✓ Valid (Map)
    SyncIterableSchema.parse(
    (function* () {
    yield 1;
    })(),
    ); // ✓ Valid (generator)
    SyncIterableSchema.parse(42); // ✗ Throws validation error
    SyncIterableSchema.parse({}); // ✗ Throws validation error (plain objects are not iterable)
    import { createAssertion, use } from 'bupkis';
    import { SyncIterableSchema } from 'bupkis/schema';

    const iterableAssertion = createAssertion(
    [SyncIterableSchema, 'to be iterable'],
    SyncIterableSchema,
    );

    const { expect } = use([iterableAssertion]);
    expect([1, 2, 3], 'to be iterable');