Node.js globals
Static variables
staticread onlyexports:Dynamic<Dynamic>
This variable may appear to be global but is not. See exports.
staticinlineread onlyglobal:Dynamic<Dynamic> = cast Node
In browsers, the top-level scope is the global scope.
This means that within the browser var something
will define a new global variable.
In Node.js this is different. The top-level scope is not the global scope; var something
inside a Node.js module
will be local to that module.
Static methods
staticqueueMicrotask(callback:() ‑> Void):Void
The queueMicrotask()
method queues a microtask to invoke callback
.
If callback
throws an exception, the process object 'uncaughtException' event will be emitted.
The microtask queue is managed by V8 and may be used in a similar manner to the Process.nextTick()
queue,
which is managed by Node.js.
The Process.nextTick()
queue is always processed before the microtask queue within each turn of the Node.js event loop.
staticinlinerequire(module:String):Dynamic
This variable may appear to be global but is not. See require().
staticsetImmediate(callback:Function, args:Rest<Dynamic>):Immediate
setImmediate
is described in the timers section.