throwIfAborted
throwIfAborted
は引数に渡された中止シグナルが中止されている場合に、その理由を投げる関数です。new AbortSignal().throwIfAborted()
が実装されていない環境のために提供されています。
インポート
import { throwIfAborted } from "@tai-kun/surrealdb/utils";
使い方
function throwIfAborted(signal: AbortSignal | null | undefined): void;
引数
signal
- 中止シグナルです。
返値
なし。