From 98e981dccfa5f2d5c8d1c5fa5e36d4c3862e2000 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 7 Jan 2021 20:10:11 +0100 Subject: [PATCH] Custom util inspectors for Set and Dictionary too --- implementations/javascript/src/node_support.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/implementations/javascript/src/node_support.ts b/implementations/javascript/src/node_support.ts index e290d70..80c33d0 100644 --- a/implementations/javascript/src/node_support.ts +++ b/implementations/javascript/src/node_support.ts @@ -1,9 +1,9 @@ // Patching to support node.js extensions. import * as util from 'util'; -import { Record, Bytes, Annotated } from './values'; +import { Record, Bytes, Annotated, Set, Dictionary } from './values'; -[Bytes, Annotated, Record].forEach((C) => { +[Bytes, Annotated, Record, Set, Dictionary].forEach((C) => { C.prototype[util.inspect.custom] = function (_depth: any, _options: any) { return this.asPreservesText(); };