BUPKIS
    Preparing search index...

    Interface ExpectAsyncProps<AsyncAssertions, SyncAssertions>

    Properties available on asynchronous expect functions.

    This interface defines the additional properties and methods that are attached to async expect functions, extending the base expect functionality with async-specific features. These properties provide access to the underlying assertions and enable function composition through the use method.

    const expectAsync: ExpectAsync<MyAsyncAssertions> =
    createExpectAsyncFunction(assertions);

    // Access the underlying assertions
    console.log(expectAsync.assertions.length);

    // Compose with additional assertions
    const { expectAsync: enhanced } = expectAsync.use(moreAssertions);
    interface ExpectAsyncProps<
        AsyncAssertions extends AnyAsyncAssertions,
        SyncAssertions extends AnySyncAssertions,
    > {
        assertions: AsyncAssertions;
        createAssertion: CreateAssertionFn;
        createAsyncAssertion: CreateAsyncAssertionFn;
        fail: FailFn;
        it: UnionToIntersection<
            TupleToUnion<
                {
                    [K in string
                    | number
                    | symbol]: AsyncAssertions[K<K>] extends AnyAsyncAssertion
                        ? any[any]["parts"] extends AssertionParts
                            ? ExpectItFunctionAsync<any[any]["parts"]>
                            : never
                        : never
                },
            >,
        >;
        use: UseFn<SyncAssertions, AsyncAssertions>;
    }

    Type Parameters

    • AsyncAssertions extends AnyAsyncAssertions

      Array of async assertion objects available to this expect function

    • SyncAssertions extends AnySyncAssertions

      Array of sync assertion objects available for composition via use

    Hierarchy (View Summary)

    Index

    Properties

    assertions: AsyncAssertions

    Tuple of all assertions available in this expect().

    createAssertion: CreateAssertionFn

    Creates a new synchronous assertion.

    createAsyncAssertion: CreateAsyncAssertionFn

    Creates a new asynchronous assertion.

    fail: FailFn

    Fails immediately with optional reason.

    Reason for failure

    it: UnionToIntersection<
        TupleToUnion<
            {
                [K in string
                | number
                | symbol]: AsyncAssertions[K<K>] extends AnyAsyncAssertion
                    ? any[any]["parts"] extends AssertionParts
                        ? ExpectItFunctionAsync<any[any]["parts"]>
                        : never
                    : never
            },
        >,
    >

    Factory type for creating async embeddable assertion executors.

    This type generates a union of all possible expectAsync.it function signatures based on the available asynchronous assertions. Each assertion contributes its own function signature to create embeddable async executors that can be used within async object patterns for complex validation scenarios.

    The resulting functions are designed to be used exclusively within async 'to satisfy' assertion contexts, where they provide type-safe pattern matching for nested object structures with Promise-based validation.

    The type of a use() function.