Skip to content

Inspectable

14 exports Added in v2.0.0 Source

Models

Inspectable interface

Added in v2.0.0 Source

Signature

interface Inspectable {
  [NodeInspectSymbol](): unknown;
  toJSON(): unknown;
  toString(): string;
}

Other

BaseProto

Added in v2.0.0 Source

Signature

declare const BaseProto: Inspectable;

Class

Added in v2.0.0 Source

Signature

declare class Class {
  constructor();
  [NodeInspectSymbol](): unknown;
  abstract toJSON(): unknown;
  toString(): string;
}

format

Added in v2.0.0 Source

Signature

declare function format(x: unknown): string;

Signature

declare function stringifyCircular(obj: unknown, whitespace?: string | number): string;

toJSON

Added in v2.0.0 Source

Signature

declare function toJSON(x: unknown): unknown;

Signature

declare function toStringUnknown(u: unknown, whitespace: string | number | undefined): string;

Redactable

isRedactable

Added in v3.10.0 Source

Signature

declare function isRedactable(u: unknown): u is Redactable;

redact

Added in v3.10.0 Source

Signature

declare function redact(u: unknown): unknown;

Redactable interface

Added in v3.10.0 Source

Signature

interface Redactable {
  readonly [symbolRedactable]: (fiberRefs: FiberRefs) => unknown;
}

Signature

declare const symbolRedactable: unique symbol;

Signature

declare function withRedactableContext<A>(context: FiberRefs, f: () => A): A;

Symbols

Signature

declare const NodeInspectSymbol: typeof NodeInspectSymbol;

NodeInspectSymbol type

Added in v2.0.0 Source

Signature

type NodeInspectSymbol = typeof NodeInspectSymbol;