mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
[Node] console.dir() options (#16961)
* [Node] console.dir() options * [Node] v6 console.dir() options as InspectOptions * [Node] v4 console.dir() options as InspectOptions * [Node] v0 console.dir() options as InspectOptions Adds Console interface and its absent variable declaration
This commit is contained in:
16
types/node/v4/index.d.ts
vendored
16
types/node/v4/index.d.ts
vendored
@@ -16,7 +16,7 @@ interface Console {
|
||||
new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream): Console;
|
||||
};
|
||||
assert(value: any, message?: string, ...optionalParams: any[]): void;
|
||||
dir(obj: any, options?: {showHidden?: boolean, depth?: number, colors?: boolean}): void;
|
||||
dir(obj: any, options?: NodeJS.InspectOptions): void;
|
||||
error(message?: any, ...optionalParams: any[]): void;
|
||||
info(message?: any, ...optionalParams: any[]): void;
|
||||
log(message?: any, ...optionalParams: any[]): void;
|
||||
@@ -228,6 +228,13 @@ declare var Buffer: {
|
||||
* *
|
||||
************************************************/
|
||||
declare namespace NodeJS {
|
||||
export interface InspectOptions {
|
||||
showHidden?: boolean;
|
||||
depth?: number | null;
|
||||
colors?: boolean;
|
||||
customInspect?: boolean;
|
||||
}
|
||||
|
||||
export interface ErrnoException extends Error {
|
||||
errno?: number;
|
||||
code?: string;
|
||||
@@ -2237,13 +2244,8 @@ declare module "stream" {
|
||||
}
|
||||
|
||||
declare module "util" {
|
||||
export interface InspectOptions {
|
||||
showHidden?: boolean;
|
||||
depth?: number | null;
|
||||
colors?: boolean;
|
||||
customInspect?: boolean;
|
||||
}
|
||||
|
||||
export interface InspectOptions extends NodeJS.InspectOptions {}
|
||||
export function format(format: any, ...param: any[]): string;
|
||||
export function debug(string: string): void;
|
||||
export function error(...param: any[]): void;
|
||||
|
||||
Reference in New Issue
Block a user