Console
Output functions for debugging. These compile directly to their JavaScript console equivalents.
Functions
Section titled “Functions”| Function | Signature | Description |
|---|---|---|
Console.log | T -> () | Log a value |
Console.warn | T -> () | Log a warning |
Console.error | T -> () | Log an error |
Console.info | T -> () | Log info |
Console.debug | T -> () | Log debug info |
Console.time | string -> () | Start a named timer |
Console.timeEnd | string -> () | End a named timer and print duration |
Examples
Section titled “Examples”Console.log("hello")Console.warn("careful")
// TimingConsole.time("fetch")const data = try fetchData()?Console.timeEnd("fetch")