1 | # Installation
|
2 | > `npm install --save @types/debug`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for debug (https://github.com/debug-js/debug).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debug/index.d.ts)
|
10 | ````ts
|
11 | declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug };
|
12 |
|
13 | export = debug;
|
14 | export as namespace debug;
|
15 |
|
16 | declare namespace debug {
|
17 | interface Debug {
|
18 | (namespace: string): Debugger;
|
19 | coerce: (val: any) => any;
|
20 | disable: () => string;
|
21 | enable: (namespaces: string) => void;
|
22 | enabled: (namespaces: string) => boolean;
|
23 | formatArgs: (this: Debugger, args: any[]) => void;
|
24 | log: (...args: any[]) => any;
|
25 | selectColor: (namespace: string) => string | number;
|
26 | humanize: typeof import("ms");
|
27 |
|
28 | names: RegExp[];
|
29 | skips: RegExp[];
|
30 |
|
31 | formatters: Formatters;
|
32 |
|
33 | inspectOpts?: {
|
34 | hideDate?: boolean | number | null;
|
35 | colors?: boolean | number | null;
|
36 | depth?: boolean | number | null;
|
37 | showHidden?: boolean | number | null;
|
38 | };
|
39 | }
|
40 |
|
41 | type IDebug = Debug;
|
42 |
|
43 | interface Formatters {
|
44 | [formatter: string]: (v: any) => string;
|
45 | }
|
46 |
|
47 | type IDebugger = Debugger;
|
48 |
|
49 | interface Debugger {
|
50 | (formatter: any, ...args: any[]): void;
|
51 |
|
52 | color: string;
|
53 | diff: number;
|
54 | enabled: boolean;
|
55 | log: (...args: any[]) => any;
|
56 | namespace: string;
|
57 | destroy: () => boolean;
|
58 | extend: (namespace: string, delimiter?: string) => Debugger;
|
59 | }
|
60 | }
|
61 |
|
62 | ````
|
63 |
|
64 | ### Additional Details
|
65 | * Last updated: Thu, 09 Nov 2023 03:06:57 GMT
|
66 | * Dependencies: [@types/ms](https://npmjs.com/package/@types/ms)
|
67 |
|
68 | # Credits
|
69 | These definitions were written by [Seon-Wook Park](https://github.com/swook), [Gal Talmor](https://github.com/galtalmor), [John McLaughlin](https://github.com/zamb3zi), [Brasten Sager](https://github.com/brasten), [Nicolas Penin](https://github.com/npenin), [Kristian Brünn](https://github.com/kristianmitk), and [Caleb Gregory](https://github.com/calebgregory).
|
70 |
|
\ | No newline at end of file |