contexify
Version:
A TypeScript library providing a powerful dependency injection container with context-based IoC capabilities, inspired by LoopBack's Context system.
23 lines (21 loc) • 688 B
TypeScript
/**
* A lightweight debugger inspired by the debug package
* Provides similar functionality with a smaller footprint
*/
interface DebuggerOptions {
colors?: boolean;
timestamp?: boolean;
formatters?: Record<string, (v: any) => string>;
}
interface Debugger {
enabled: boolean;
(formatter: unknown, ...args: unknown[]): void;
extend: (suffix: string) => Debugger;
}
declare function createDebugger(namespace: string): Debugger;
/**
* Configure the debugger
* @param options - Debugger options
*/
declare function configure(options: DebuggerOptions): void;
export { type Debugger, type DebuggerOptions, configure, createDebugger, createDebugger as default };