mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
`var nextTick = typeof setImmediate === "function" ? setImmediate : setTimeout` (bcryptjs) and `cond ? setImmediate : process.nextTick` stored the builtin as an identity token string, so typeof answered "string" and calling it threw "nextTick is not a function". The JavaScript identifier, `globalThis.X` and destructuring spellings of setTimeout, setInterval, setImmediate, clearTimeout, clearInterval, clearImmediate and queueMicrotask, and a stored process.nextTick, now read one interned runtime function per name. Conditional, logical and assigned values carry it like any function: typeof is "function", identity holds across spellings, and calls validate the callback (ERR_INVALID_ARG_TYPE), coerce the delay, pass the extra arguments and return the same numeric handles the direct calls return, which the stored clear functions accept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>