Skip to content

CUSTOM_DUMP

const CUSTOM_DUMP: typeof CUSTOM_DUMP

Defined in: aberdeen.ts:3635

When set on an object or its prototype chain, dump calls this as a render function (with the object as this) instead of its default recursive rendering. If the value is not a function, it’s treated as a string to display.

class Color {
constructor(public r: number, public g: number, public b: number) {}
[CUSTOM_DUMP]() { A(`#rgb(${this.r}, ${this.g}, ${this.b})`); }
}