DefinitelyTyped/debug/debug.d.ts
Gal Talmor 6df499b659 Improved visionmedia/debug to include non-amd version
Improved visionmedia/debug, a tiny npm package for debugging. 
Added both AMD and non-AMD definition support
2015-12-23 16:25:21 +02:00

39 lines
924 B
TypeScript

// Type definitions for debug
// Project: https://github.com/visionmedia/debug
// Definitions by: Seon-Wook Park <https://github.com/swook>, Gal Talmor <https://github.com/galtalmor>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare var debug:debug.IDebug;
// Support AMD require
declare module 'debug' {
export = debug;
}
declare module debug {
export interface IDebug {
(namespace: string):debug.IDebugger,
coerce:(val:any)=>any,
disable:()=>void,
enable:(namespaces:string)=>void,
enabled:(namespaces:string)=>boolean,
names:string[],
skips:string[],
formatters:IFormatters
}
export interface IFormatters {
[formatter:string]: Function
}
export interface IDebugger {
(formatter: any, ...args: any[]): void;
enabled:boolean;
log:Function;
namespace:string;
}
}