Package: effect
Module: Inspectable
The type of the Node.js inspection symbol used for custom object inspection. This symbol type is used to implement custom inspection behavior in Node.js environments.
When to use
Use to type methods keyed by the Node.js custom inspection symbol.
Example (Typing custom Node inspection)
import { Inspectable } from "effect"
class CustomObject {
constructor(private value: string) {}
[Inspectable.NodeInspectSymbol]() {
return `CustomObject(${this.value})`
}
}
const obj = new CustomObject("test")
console.log(obj) // CustomObject(test)
Signature
type NodeInspectSymbol = typeof NodeInspectSymbol
Since v2.0.0