x/evt@v1.10.2/tools/safeSetTimeout.ts

šŸ’§EventEmitter's typesafe replacement
GitHub Stars
364
Go to latest
safeSetTimeout.ts

//NOTE: Deno can't use NodeJS type def ( obviously )export type Timer= { _timerBrand: any; };export const safeSetTimeout = (callback: () => void, ms: number): Timer => setTimeout(callback, ms) as any;export const safeClearTimeout = (timer: Timer): void => clearTimeout(timer as any);