Removing timeout reject option.

This commit is contained in:
mike12345567 2024-02-14 15:05:08 +00:00
parent 77225e6eb9
commit fa585fe69d
1 changed files with 2 additions and 13 deletions

View File

@ -226,19 +226,8 @@ export function isClient(ctx: Ctx) {
return ctx.headers[Header.TYPE] === "client"
}
export function timeout(
timeMs: number,
opts?: { reject?: boolean }
): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => {
if (opts?.reject) {
reject(new Error(`timed out - ${timeMs}ms`))
} else {
resolve()
}
}, timeMs)
})
export function timeout(timeMs: number) {
return new Promise(resolve => setTimeout(resolve, timeMs))
}
export function isAudited(event: Event) {