wtfnode 0.7.0 (#29559)

This commit is contained in:
Piotr Roszatycki
2018-10-09 08:44:21 -07:00
committed by Andy
parent b17c41af1e
commit a04638d3e7
2 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
// Type definitions for wtfnode 0.5
// Type definitions for wtfnode 0.7
// Project: https://github.com/myndzi/wtfnode
// Definitions by: Piotr Roszatycki <https://github.com/dex4er>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function dump(): void;
export function init(): void;
export function setLogger(type: 'info' | 'warn' | 'error', fn: (message?: any, ...optionalParams: any[]) => void): void;
export function resetLoggers(): void;
+6
View File
@@ -1,4 +1,10 @@
/// <reference types="node" />
import * as wtf from 'wtfnode';
wtf.init();
wtf.setLogger('info', (message?: any, ...optionalParams: any[]) => console.info(message, ...optionalParams));
wtf.setLogger('warn', (message?: any, ...optionalParams: any[]) => console.warn(message, ...optionalParams));
wtf.setLogger('error', (message?: any, ...optionalParams: any[]) => console.error(message, ...optionalParams));
wtf.dump();
wtf.resetLoggers();