function abortSignal(signal) {
    if (signal.aborted) {
        return;
    }
    if (signal.onabort) {
        signal.onabort.call(signal);
    }
    const listeners = listenersMap.get(signal);
    if (listeners) {
        // Create a copy of listeners so mutations to the array
        // (e.g. via removeListener calls) don't affect the listeners
        // we invoke.
        listeners.slice().forEach((listener) => {
            listener.call(signal, { type: "abort" });
        });
    }
    abortedMap.set(signal, true);
}
Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.
Will try to trigger abort event for all linked AbortSignal nodes.

- If there is a timeout, the timer will be cancelled.
- If aborted is true, nothing will happen.

@internal