mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
wtfnode 0.7.0 (#29559)
This commit is contained in:
Vendored
+3
-1
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user