Custom util inspectors for Set and Dictionary too
This commit is contained in:
parent
66cac324e0
commit
98e981dccf
|
@ -1,9 +1,9 @@
|
||||||
// Patching to support node.js extensions.
|
// Patching to support node.js extensions.
|
||||||
|
|
||||||
import * as util from 'util';
|
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) {
|
C.prototype[util.inspect.custom] = function (_depth: any, _options: any) {
|
||||||
return this.asPreservesText();
|
return this.asPreservesText();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue