Files
Donny/강동윤andGitHub 5888bb902b fix: Allow guarded usage of node.js APIs from edge runtime (#69283)
### What?

Improve the node.js linter

### Why?

It should not warn for _safe_ usage.

x-ref: https://vercel.slack.com/archives/C04DUD7EB1B/p1724522593235339

### How?
2024-08-26 18:25:58 +09:00

10 lines
277 B
JavaScript

if (typeof clearImmediate === 'function') {
console.log(clearImmediate())
}
// We allow this.
const scheduleTimeoutA =
typeof setImmediate === 'function' ? setImmediate : setTimeout
const scheduleTimeoutB =
typeof setImmediate !== 'function' ? setTimeout : setImmediate