# console
console 全局的实现。
¥An implementation of the console global.
# 静态成员
¥Static members
- function assert<T>(assertion: T, message?: string): void- 如果 - assertion为 false,则将- message记录到控制台。- ¥Logs - messageto console if- assertionis false-ish.
- function log(message?: string): void- 将 - message输出到控制台。- ¥Outputs - messageto the console.
- function debug(message?: string): void function info(message?: string): void function warn(message?: string): void function error(message?: string): void- 将 - message输出到控制台,分别以 "调试:"、"信息:"、"警告:" 或 "错误:" 为前缀。- ¥Outputs - messageto the console, prefixed with "Debug:", "Info:", "Warning:" or "Error:" respectively.
- function time(label?: string): void- 使用指定的 - label启动新计时器。- ¥Starts a new timer using the specified - label.
- function timeLog(label?: string): void- 记录先前使用 - console.time启动的计时器的当前值。- ¥Logs the current value of a timer previously started with - console.time.
- function timeEnd(label?: string): void- 记录先前以 - console.time启动的计时器的当前值并丢弃该计时器。- ¥Logs the current value of a timer previously started with - console.timeand discards the timer.
← ArrayBuffer crypto →