Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format: provide formatter inside custom symbol #107

Closed
Kikobeats opened this issue Aug 23, 2022 · 0 comments
Closed

format: provide formatter inside custom symbol #107

Kikobeats opened this issue Aug 23, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@Kikobeats
Copy link
Member

Kikobeats commented Aug 23, 2022

If you use the formatter with custom symbol, like:

  [customInspectSymbol]() {
    return JSON.stringify(deepObject) // ugh
  }

You are losing formatter capabilities since you have to manually stringify the value by your own.

Ideally, the formatter should be available there:

  [customInspectSymbol]({ format }) {
    return format(deepObject) // yay
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant