From 36012be49ac67e63082350edb1b58500b232e64e Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Sun, 19 Mar 2023 17:03:54 +0100 Subject: [PATCH] Add missing declarations for custom inspect methods --- src/util.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index bb50abae5..acbd75c87 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,8 +1,13 @@ import path from "path" import stream from "stream" +import { inspect } from "util"; -export const isDebug = true; +export const isDebug = process.env['NODE_ENV'] === 'development'; + +export const customInspectSymbol = Symbol.for('nodejs.util.inspect.custom') + +export type InspectFn = typeof inspect; export function first(iter: Iterator): T | undefined { return iter.next().value;