2021-01-07 16:41:46 +00:00
|
|
|
// Patching to support node.js extensions.
|
|
|
|
|
|
|
|
import * as util from 'util';
|
2021-01-07 19:10:11 +00:00
|
|
|
import { Record, Bytes, Annotated, Set, Dictionary } from './values';
|
2021-01-07 16:41:46 +00:00
|
|
|
|
2021-01-07 19:10:11 +00:00
|
|
|
[Bytes, Annotated, Record, Set, Dictionary].forEach((C) => {
|
2021-01-07 16:41:46 +00:00
|
|
|
C.prototype[util.inspect.custom] = function (_depth: any, _options: any) {
|
|
|
|
return this.asPreservesText();
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
Record.fallbackToString = util.inspect;
|