src/nodejs/jstimers

Procs

func hasRef(self: Immediate): bool {.importjs: "#.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/timers.html#timers_immediate_hasref
func importTimers() {.importjs: "import * as timers from \'timers\'@",
                      ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module
func importTimersPromises() {.importjs: "import * as timersPromises from \'timers/promises\'@",
                              ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module
func newImmediate(): Immediate {.importjs: "(new timers.Immediate())",
                                 ...raises: [], tags: [].}
func newTimeout(): Timeout {.importjs: "(new timers.Timeout())", ...raises: [],
                             tags: [].}
func refs(self: Immediate): Immediate {.importjs: "#.ref()", ...raises: [],
                                        tags: [].}
https://nodejs.org/api/timers.html#timers_immediate_ref
func requireTimers() {.importjs: "const timers = require(\'timers\')@",
                       ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module
func requireTimersPromises() {.importjs: "const timersPromises = require(\'timers/promises\')@",
                               ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module
func setImmediate[T](callback: T): Immediate {.importjs: "timers.$1(#)",
    discardable, ...raises: [], tags: [].}
https://nodejs.org/api/timers.html#timers_timerspromises_setimmediate_value_options
func setInterval[T](callback: T; delay: cint): Timeout {.
    importjs: "timers.$1(#, #)", discardable, ...raises: [], tags: [].}
https://nodejs.org/api/timers.html#timers_setinterval_callback_delay_args
func setTimeout[T](callback: T; delay: cint): Timeout {.
    importjs: "timers.$1(#, #)", discardable, ...raises: [], tags: [].}
https://nodejs.org/api/timers.html#timers_settimeout_callback_delay_args
func unrefs(self: Immediate): Immediate {.importjs: "#.unref()", ...raises: [],
    tags: [].}
https://nodejs.org/api/timers.html#timers_immediate_unref