Files
DefinitelyTyped/types/eyes/index.d.ts
Nathan Shively-Sanders 163f4438df Fix weak type errors (#16845)
* Fix first round of weak type errors

Done through griddle-react

* 95% done with weak type fixes

* Fix last couple of weak type errors

* Remove some lint from mithril tests

* mithril's Lifecycle is not a weak type any more

Restore the Lifecycle constraints in the rest of the definitions.

* Fix react-redux tests after #16652 broke them

* Remove package-lock.json
2017-06-04 22:03:03 -07:00

50 lines
1.6 KiB
TypeScript

// 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/DefinitelyTyped/DefinitelyTyped
///<reference types="node"/>
import stream = require('stream');
export declare function inspector(options?: EyesOptions): InspectorFunction;
export declare function inspect(thing: any, label?: string): void;
export interface InspectorFunction {
(thing: any, label?: string): string;
}
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?: NodeJS.WritableStream;
/** Truncate output if longer */
maxLength?: number;
}