KiteJsConfig

open class KiteJsConfig(source)

How to build an engine: what every engine understands. Everything has a working default, and an engine's own configuration adds what only it can do.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var clock: () -> Double?

Where Date.now() reads the time from, in epoch milliseconds. Fix it to make tests stable.

Link copied to clipboard

Where console.log and its neighbours go. Null leaves console out of the global scope.

Link copied to clipboard

How much work one call may do before the engine gives up. Zero, the default, means no limit. This is how you stop a script that never returns. The Promise reactions a call queues run within the same budget, and when the engine stops a script the reactions still queued are dropped, so the abandoned work does not run on the next call.

Link copied to clipboard

Asked now and then while a script runs, its Promise reactions included. Answer true, or throw, to stop it. This is how an outside signal reaches a running script: a deadline, a cancelled coroutine, a stop button. As with the budget, a stop drops the reactions still queued.

Link copied to clipboard

Makes the built-ins read-only, so a script cannot redefine Array.prototype.push.

Link copied to clipboard
var timeZone: TimeZone

The zone Date reads local time in.