forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eyes.d.ts
54 lines (46 loc) · 1.81 KB
/
eyes.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Type definitions for eyes 0.1.8
// Project: https://github.com/cloudhead/eyes.js
// Definitions by: bryn austin bellomy <https://github.com/brynbellomy>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../node/node.d.ts"/>
declare module "eyes"
{
import stream = require('stream');
export function inspector(options?:EyesOptions): InspectorFunction;
export function inspect(thing:any, label?:string): void;
export interface InspectorFunction {
(thing:any, label?:string): void;
}
export interface EyesOptions
{
/** Styles applied to stdout */
styles?: {
/** Overall base style applied to everything */
all?: string;
/** Style when printing inspection labels, like 'array' in `array: [1, 2, 3]` */
label?: string;
/** Style when printing objects which don't have a literal representation, such as functions */
other?: string;
/** Style when printing the keys in object literals, like 'a' in `{a: 1}` */
key?: string;
/** Style when printing `null`, `undefined`, etc. */
special?: string;
/** Style when printing strings */
string?: string;
/** Style when printing numbers */
number?: string;
/** Style when printing booleans */
bool?: string;
/** Style when printing RegExps */
regexp?: string;
};
/** Indent object literals */
pretty?: boolean;
/** Don't output functions at all */
hideFunctions?: boolean;
/** Stream to write to, or null */
stream?: stream.Writable;
/** Truncate output if longer */
maxLength?: number;
}
}