-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.questionIssues that look for answers.Issues that look for answers.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
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).
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.questionIssues that look for answers.Issues that look for answers.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.