Closed
Description
I want to implement inspect for my own object. I want to mostly follow the semantics of inspect
for non-custom implementations, but just by going by the documentation alone, I have no possible way of doing so. What conventions are there? How do I recursively call inspect
while respecting depth? Do I need to handle the case of depth being null?
The example ignores the parameters passed to it completely currently. Maybe if we had an example of a Box
object that inspects as "Box<InnerInspectValue>"
so e.g. inspect({value: "a", inspect: ... })
returns "Box<'a'>"
but the value can be anything (including over objects with custom inspect impls).