UNPKG

383 BPlain TextView Raw
1/**
2 * logger
3 */
4export function log(
5 options: log.Options,
6 debug: (message?: any, ...optionalParams: any[]) => void,
7 ...args: any[]
8): void {
9 if (options.silent) {
10 debug(...args);
11 } else {
12 console.log(...args);
13 }
14}
15
16/**
17 * Namespace
18 */
19export namespace log {
20 /**
21 * Options object
22 */
23 export interface Options {
24 silent?: true;
25 }
26}
27console.log();