Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
secondsToMilliseconds,
} from 'date-fns'
import { getRandomValues, randomBytes, randomUUID } from 'node:crypto'
-import { env, nextTick } from 'node:process'
+import { env } from 'node:process'
import { is, isNotEmpty, type NonEmptyArray, type ReadonlyNonEmptyArray } from 'rambda'
import {
return true
}
-export const throwErrorInNextTick = (error: Error): void => {
- nextTick(() => {
+export const queueMicrotaskErrorThrowing = (error: Error): void => {
+ queueMicrotask(() => {
throw error
})
}