0
在node.d.ts
其宣佈爲util.inspect.defaultOptions在打字稿
declare module "util" {
export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
export function inspect(object: any, options: InspectOptions): string;
}
,所以我不能擴展它
我試圖
declare module 'util' {
export interface inspect {
defaultOptions: InspectOptions;
}
}
但它一直示數 Property 'defaultOptions' does not exist on type '{ (object: any, showHidden?: boolean, depth?: number, color?: boolean): string; (object: any, opt...'.