2021-01-07 16:41:46 +00:00
|
|
|
// Patching to support node.js extensions.
|
|
|
|
|
2021-03-02 21:43:10 +00:00
|
|
|
import { Annotated } from './annotated';
|
|
|
|
import { Bytes } from './bytes';
|
|
|
|
import { Set, Dictionary } from './dictionary';
|
|
|
|
import { Record } from './record';
|
|
|
|
|
2021-01-07 16:41:46 +00:00
|
|
|
import * as util from 'util';
|
|
|
|
|
2021-02-25 18:37:22 +00:00
|
|
|
[Bytes, Annotated, Set, Dictionary].forEach((C) => {
|
2021-01-15 13:01:14 +00:00
|
|
|
(C as any).prototype[util.inspect.custom] =
|
|
|
|
function (_depth: any, _options: any) {
|
|
|
|
return this.asPreservesText();
|
|
|
|
};
|
2021-01-07 16:41:46 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Record.fallbackToString = util.inspect;
|