-
-
Notifications
You must be signed in to change notification settings - Fork 687
Expand file tree
/
Copy pathconsole.ts
More file actions
42 lines (32 loc) · 907 Bytes
/
console.ts
File metadata and controls
42 lines (32 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {
console as binding
} from "./bindings/dom";
export namespace console {
export function assert<T>(condition: T, message: string = ""): void {
binding.assert(!!condition, message);
}
export function log(message: string = ""): void {
binding.log(message);
}
export function debug(message: string = ""): void {
binding.debug(message);
}
export function info(message: string = ""): void {
binding.info(message);
}
export function warn(message: string = ""): void {
binding.warn(message);
}
export function error(message: string = ""): void {
binding.error(message);
}
export function time(label: string = "default"): void {
binding.time(label);
}
export function timeLog(label: string = "default"): void {
binding.timeLog(label);
}
export function timeEnd(label: string = "default"): void {
binding.timeEnd(label);
}
}