bupkis
    Preparing search index...

    Type Alias FilterAsyncAssertions<MixedAssertions>

    FilterAsyncAssertions: MixedAssertions extends readonly [
        infer MixedAssertion extends AnyAssertion,
        ...(infer Rest extends readonly AnyAssertion[]),
    ]
        ? MixedAssertion extends AnyAsyncAssertion
            ? readonly [MixedAssertion, ...FilterAsyncAssertions<Rest>]
            : FilterAsyncAssertions<Rest>
        : readonly []

    Given a mixed array of assertions, filters out only the async assertions.

    This utility type recursively examines each assertion in the input array and constructs a new tuple containing only the asynchronous assertions. It uses conditional types to test whether each assertion extends AnyAsyncAssertion and includes it in the result if so.

    Used primarily by UseFn to separate async assertions from mixed assertion arrays when composing expect functions.

    Type Parameters

    • MixedAssertions extends readonly AnyAssertion[]

      Array that may contain both sync and async assertions

    type Mixed = [
    SyncAssertion1,
    AsyncAssertion1,
    SyncAssertion2,
    AsyncAssertion2,
    ];
    type AsyncOnly = FilterAsyncAssertions<Mixed>; // [AsyncAssertion1, AsyncAssertion2]