-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.d.ts
36 lines (31 loc) · 835 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
export type Token = ( payload: TokenPayload ) => string | number;
export interface TokenPayload {
method: string
params: (string | number)[]
tokens: Record<string, Token>
defaultTokens: Record<string, Token>
msg: string
}
export interface SpyStream extends NodeJS.WriteStream{
length: number
last: string
flush: ()=>void
asArray: string[]
}
declare global {
interface Console {
reset: () => void;
org: Console
}
}
declare function consoleStamp(console: Console, options?: {
format?: string
tokens?: Record<string, Token>
include?: string[]
level?: string
extend?: Record<string, number>
stdout?: NodeJS.WriteStream | SpyStream
stderr?: NodeJS.WriteStream | SpyStream
preventDefaultMessage?: boolean
}): void;
export default consoleStamp;