Skip to content

Discussion: private fields and util.inspect #27404

Open
@jasnell

Description

Now that we have support for private class fields... we need to figure out how (and if) we want to support them with regards to util.inspect()...

Right now, those properties are hidden from the output even when showHidden is true...

class F { #foo = 1; }
const f = new F()
util.inspect(f)  // returns 'F {}'
util.inspect(f, { showHidden: true }) // returns 'F {}'

How should we handle these with inspect?

Metadata

Assignees

No one assigned

    Labels

    utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions