Node
Node.js globals
Static Members
console: js.node.console.Console
Used to print to stdout and stderr. See the console section.
exports: Dynamic
This variable may appear to be global but is not. See exports.
global: Dynamic
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.
module: js.node.Module
This variable may appear to be global but is not. See module.
process: js.node.Process
The process object. See the process object section.
clearImmediate(immediate: js.node.Immediate): Void
clearImmediate
is described in the timers section.
Name | Type |
---|---|
immediate |
js.node.Immediate |
clearInterval(timeout: js.node.Timeout): Void
clearInterval
is described in the timers section.
Name | Type |
---|---|
timeout |
js.node.Timeout |
clearTimeout(timeout: js.node.Timeout): Void
clearTimeout
is described in the timers section.
Name | Type |
---|---|
timeout |
js.node.Timeout |
queueMicrotask(callback: Function): 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.
Name | Type |
---|---|
callback |
Function |
This variable may appear to be global but is not. See require().
Name | Type |
---|---|
module |
String |
Returns |
---|
Dynamic |
setImmediate(callback: haxe.Function, args: haxe.extern.Rest): js.node.Immediate
setImmediate
is described in the timers section.
Name | Type |
---|---|
callback |
haxe.Function |
args |
haxe.extern.Rest |
Returns |
---|
js.node.Immediate |
setInterval(callback: haxe.Function, delay: Int, args: haxe.extern.Rest): js.node.Timeout
setInterval
is described in the timers section.
Name | Type |
---|---|
callback |
haxe.Function |
delay |
Int |
args |
haxe.extern.Rest |
Returns |
---|
js.node.Timeout |
setTimeout(callback: haxe.Function, delay: Int, args: haxe.extern.Rest): js.node.Timeout
setTimeout
is described in the timers section.
Name | Type |
---|---|
callback |
haxe.Function |
delay |
Int |
args |
haxe.extern.Rest |
Returns |
---|
js.node.Timeout |