console
Leveled logging to stdout and stderr.
Always available
No import needed. These names are in scope in every file.
console class
ts
class consoleconsole.assert
ts
static assert(condition: any, ...messages: any[]): voidThrow-style assertion. When condition is falsy, prints Assertion failed: followed by the space-joined messages. When truthy, the call is a no-op. Calling with zero arguments is treated as a failed assertion with no message.
console.error
ts
static error(...args: any[]): voidPrint one space-joined line prefixed with ERROR: to stdout and capture it as an error-tagged output event.
console.info
ts
static info(...args: any[]): voidPrint one space-joined line to stdout. Behaviourally identical to log today; reserved for informational output that hosts may route to a separate channel later.
console.log
ts
static log(...args: any[]): voidPrint one space-joined line to stdout and capture it as an output event. The standard diagnostic entry point.
console.table
ts
static table(...args: any[]): voidPrint a tab-separated tabular dump of the argument. Arrays of objects render as (index) plus one column per field of the first element; maps render as Key/Value pairs; instances render as Property/Value. Other inputs print their string form. Calling with zero arguments prints (empty).
console.time
ts
static time(label?: string): voidStart a named timer. Defaults to the label "default" when omitted. Pair with timeEnd to print the elapsed milliseconds.
console.timeEnd
ts
static timeEnd(label?: string): voidStop the named timer started by time and print <label>: <ms>ms (three decimal places). Defaults to the label "default". Unknown labels are silently ignored.
console.warn
ts
static warn(...args: any[]): voidPrint one space-joined line prefixed with WARN: to stdout and capture it as a warning-tagged output event.
Generated from lang/types/builtin_console.d.tks in the ThicketScript repository.