mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00: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:
Vendored
+12
-11
@@ -17,7 +17,7 @@
|
||||
interface Console {
|
||||
Console: NodeJS.ConsoleConstructor;
|
||||
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;
|
||||
@@ -262,6 +262,16 @@ declare var Buffer: {
|
||||
* *
|
||||
************************************************/
|
||||
declare namespace NodeJS {
|
||||
export interface InspectOptions {
|
||||
showHidden?: boolean;
|
||||
depth?: number | null;
|
||||
colors?: boolean;
|
||||
customInspect?: boolean;
|
||||
showProxy?: boolean;
|
||||
maxArrayLength?: number | null;
|
||||
breakLength?: number;
|
||||
}
|
||||
|
||||
export interface ConsoleConstructor {
|
||||
prototype: Console;
|
||||
new(stdout: WritableStream, stderr?: WritableStream): Console;
|
||||
@@ -3779,16 +3789,7 @@ declare module "stream" {
|
||||
}
|
||||
|
||||
declare module "util" {
|
||||
export interface InspectOptions {
|
||||
showHidden?: boolean;
|
||||
depth?: number | null;
|
||||
colors?: boolean;
|
||||
customInspect?: boolean;
|
||||
showProxy?: boolean;
|
||||
maxArrayLength?: number | null;
|
||||
breakLength?: number;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
Vendored
+26
-7
@@ -9,6 +9,24 @@
|
||||
* *
|
||||
************************************************/
|
||||
|
||||
interface Console {
|
||||
Console: {
|
||||
prototype: Console,
|
||||
new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream): Console;
|
||||
};
|
||||
assert(value: any, message?: string, ...optionalParams: any[]): 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;
|
||||
time(label: string): void;
|
||||
timeEnd(label: string): void;
|
||||
trace(message?: any, ...optionalParams: any[]): void;
|
||||
warn(message?: any, ...optionalParams: any[]): void;
|
||||
}
|
||||
|
||||
declare var console: Console;
|
||||
|
||||
interface Error {
|
||||
stack?: string;
|
||||
}
|
||||
@@ -159,6 +177,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;
|
||||
@@ -1791,13 +1816,7 @@ 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;
|
||||
|
||||
Vendored
+9
-7
@@ -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;
|
||||
|
||||
Vendored
+12
-11
@@ -13,7 +13,7 @@
|
||||
interface Console {
|
||||
Console: typeof NodeJS.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;
|
||||
@@ -247,6 +247,16 @@ declare var Buffer: {
|
||||
* *
|
||||
************************************************/
|
||||
declare namespace NodeJS {
|
||||
export interface InspectOptions {
|
||||
showHidden?: boolean;
|
||||
depth?: number | null;
|
||||
colors?: boolean;
|
||||
customInspect?: boolean;
|
||||
showProxy?: boolean;
|
||||
maxArrayLength?: number | null;
|
||||
breakLength?: number;
|
||||
}
|
||||
|
||||
export var Console: {
|
||||
prototype: Console;
|
||||
new(stdout: WritableStream, stderr?: WritableStream): Console;
|
||||
@@ -3632,16 +3642,7 @@ declare module "stream" {
|
||||
}
|
||||
|
||||
declare module "util" {
|
||||
export interface InspectOptions {
|
||||
showHidden?: boolean;
|
||||
depth?: number | null;
|
||||
colors?: boolean;
|
||||
customInspect?: boolean;
|
||||
showProxy?: boolean;
|
||||
maxArrayLength?: number | null;
|
||||
breakLength?: number;
|
||||
}
|
||||
|
||||
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