bupkis
    Preparing search index...

    Type Alias ExpectAsyncFunction<T>

    ExpectAsyncFunction: UnionToIntersection<
        TupleToUnion<
            {
                [K in keyof T]: T[K] extends AnyAsyncAssertion
                    ? (
                        ...args: MutableOrReadonly<SlotsFromParts<T[K]["parts"]>>,
                    ) => Promise<void>
                    : never
            },
        >,
    >

    The callable function type for asynchronous assertions.

    This type represents the actual function signature of an async expect function, created by mapping all available assertions to their respective function signatures and combining them using intersection types. Each assertion contributes its own overload to the final function type.

    The function signatures are derived from the AssertionParts of each assertion, with parameters that match the expected slots for natural language assertion calls.

    Type Parameters

    • T extends AnyAsyncAssertions = BuiltinAsyncAssertions

      Array of async assertion objects that define available assertion logic

    // Example function type derived from async assertions
    const expectAsync: ExpectAsyncFunction<MyAsyncAssertions> = ...;
    await expectAsync(promise, 'to resolve');
    await expectAsync(promise, 'to resolve with value satisfying', expectedValue);