X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Futils.ts;h=88562ca3531f9acbb446414075366a4b50ba1ce4;hb=03e74987448abc5e2c044953270c23e02b609136;hp=d15f63c557e813aec9fdeeae7f993be8f8adedc4;hpb=260d2e6df285501c69e0d4f6d29fcd4b5266ed54;p=poolifier.git diff --git a/src/utils.ts b/src/utils.ts index d15f63c5..88562ca3 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,6 @@ -import * as os from 'node:os' import { getRandomValues } from 'node:crypto' +import * as os from 'node:os' + import type { KillBehavior } from './worker/worker-options.js' /** @@ -135,7 +136,7 @@ export const isPlainObject = (value: unknown): value is object => * * @typeParam KB - Which specific KillBehavior type to test against. * @param killBehavior - Which kind of kill behavior to detect. - * @param value - Any value. + * @param value - Unknown value. * @returns `true` if `value` was strictly equals to `killBehavior`, otherwise `false`. * @internal */ @@ -200,7 +201,7 @@ export const max = (...args: number[]): number => * @internal */ // eslint-disable-next-line @typescript-eslint/no-explicit-any -export const once = ( +export const once = ( fn: (...args: A) => R, context: T ): ((...args: A) => R) => {