mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Update util.inspect API.
Latest API has an options object as the second parameter instead of separate parameters. The old API is still supported so have added the new signature as an overload. Updated node-tests.ts
This commit is contained in:
Vendored
+8
@@ -1074,6 +1074,13 @@ declare module "stream" {
|
||||
}
|
||||
|
||||
declare module "util" {
|
||||
export interface InspectOptions {
|
||||
showHidden?: boolean;
|
||||
depth?: number;
|
||||
colors?: boolean;
|
||||
customInspect?: boolean;
|
||||
}
|
||||
|
||||
export function format(format: any, ...param: any[]): string;
|
||||
export function debug(string: string): void;
|
||||
export function error(...param: any[]): void;
|
||||
@@ -1081,6 +1088,7 @@ declare module "util" {
|
||||
export function print(...param: any[]): void;
|
||||
export function log(string: string): void;
|
||||
export function inspect(object: any, showHidden?: boolean, depth?: number, color?: boolean): string;
|
||||
export function inspect(object: any, options: InspectOptions): string;
|
||||
export function isArray(object: any): boolean;
|
||||
export function isRegExp(object: any): boolean;
|
||||
export function isDate(object: any): boolean;
|
||||
|
||||
Reference in New Issue
Block a user