BUPKIS
    Preparing search index...

    Type Alias ExpectItFunctionAsync<Parts>

    ExpectItFunctionAsync: (
        ...args: MutableOrReadonly<TupleTail<SlotsFromParts<Parts>>>,
    ) => Parts[0] extends z.ZodType ? ExpectItExecutorAsync<Parts[0]> : never

    Function signature for creating async ExpectItExecutorAsync instances.

    This type represents the factory function that creates embeddable async assertion executors from assertion parts. It takes the assertion parameters (excluding the subject) and returns an async executor function that can be embedded within async 'to satisfy' patterns.

    The function signature is derived from assertion parts by removing the first part (which becomes the subject type for the executor) and using the remaining parts as parameters. This allows for natural language assertion creation that mirrors the main expectAsync() function but produces reusable async executor functions.

    Type Parameters

    • Parts extends AssertionParts

      Tuple of assertion parts that define the function signature and executor constraints

    Type Declaration

    // For assertion parts: [z.string(), 'to match', z.instanceof(RegExp)]
    // Results in function: (pattern: RegExp) => ExpectItExecutorAsync<z.ZodString>
    const matchesPatternAsync = expectAsync.it('to match', /^[A-Z]/);

    await expectAsync({ code: 'ABC123' }, 'to satisfy', {
    code: matchesPatternAsync, // Async validation that code matches the pattern
    });