跳转到内容

throwIfAborted

throwIfAborted 函数用于检查传入的中止信号是否已被中止,如果是则抛出错误。该函数是为了兼容不支持 new AbortSignal().throwIfAborted() 的环境而提供的。

导入

import { throwIfAborted } from "@tai-kun/surrealdb/utils";

使用方法

function throwIfAborted(signal: AbortSignal | null | undefined): void;

参数

signal
中止信号。

返回值

无。