BUPKIS
    Preparing search index...

    Type Alias ExpectAsyncFunction<AsyncAssertion>

    ExpectAsyncFunction: (
        value: { "[InvalidAssertionChain]": "Only exists for autocompletion" },
        phrase: LiteralStringUnion<LeadingPhraseSuggestions<AsyncAssertion>>,
        ...rest: LiteralStringUnion<PhraseSuggestions<AsyncAssertion>>[],
    ) => Promise<void> & <const Args extends unknown[]>(
        value: AssertValidChain<Args, AsyncAssertion>,
        ...args: Args,
    ) => Promise<void>

    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

    // 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);

    Array of async assertion objects that define available assertion logic

    • ExpectFunction for the synchronous equivalent, with explanation of type union
    • SlotsFromParts for how assertion parts are converted to function parameters