• Races a promise and an abort signal. Generally, it is better to write your promises in a way that they reject and cleanup after an abort event (see promise), however, external promises don't always provide this capability. Some browsers accept an abort signal for fetch and addEventListener, but this is not widely supported enough to be relied upon.

    If both the abort signal is in an aborted state, and the given promise is in a resolved state, the returned promise will be rejected with the abort reason.

    Type Parameters

    • T

    Parameters

    Returns Promise<T>