Skip to main content Link Search Menu Expand Document (external link)

Inspectable overview

A simple extension to the Effect Inspectable module


Table of contents


Constants

BaseProto

Prototype of an Inspectable that overloads the toJSON method. If the object (usually its prototype) has a [IdSymbol] function, returns the result of this function. Otherwise, return this with an extra ‘_id’ field containing the moduleTag.

Signature

export declare const BaseProto: (moduleTag: string) => EInspectable.Inspectable

Models

IdSymbol

Symbol used to define a special prototype function that must return an id for the object

Signature

export declare const IdSymbol: typeof IdSymbol

IdSymbol (type alias)

Type used to define a special prototype function that must return an id for the object

Signature

export type IdSymbol = typeof IdSymbol

Inspectable (interface)

Interface that an object should implement when an id can be used to represent it

Signature

export interface Inspectable extends EInspectable.Inspectable {
  readonly [IdSymbol]: () => string
}

moduleTag

Module tag

Signature

export declare const moduleTag: "@parischap/effect-lib/Inspectable/"