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

TS Playground prints incorrect text for a Set nested within an Object #54257

Closed
zmillman opened this issue May 16, 2023 · 4 comments
Closed

TS Playground prints incorrect text for a Set nested within an Object #54257

zmillman opened this issue May 16, 2023 · 4 comments
Labels
External Relates to another program, environment, or user action which we cannot control.

Comments

@zmillman
Copy link

zmillman commented May 16, 2023

Bug Report

πŸ”Ž Search Terms

TS Playground set log console

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about printing objects

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

console.log(new Set().add("hello!"));
console.log({
    s: new Set().add("hello!")
})

πŸ™ Actual behavior

Clicked "Run", then got this result:

[LOG]: Set (1) {"hello!"} 
[LOG]: {
  "s": {}
} 

πŸ™‚ Expected behavior

Should print out:

[LOG]: Set (1) {"hello!"} 
[LOG]: {s: Set(1)}

or maybe something like this:

[LOG]: Set (1) {"hello!"} 
[LOG]: {s: Set (1) {"hello!"}}

Chrome DevTools shows this:

Screenshot 2023-05-15 at 7 24 01 PM
@jcalz
Copy link
Contributor

jcalz commented May 16, 2023

I wonder if this belongs in microsoft/TypeScript-Website instead of here? Although given microsoft/TypeScript-Website#2804 I'm not sure if it would be appropriate there either.

@jakebailey
Copy link
Member

It definitely not for this issue tracker.

Since it's not critical, we wouldn't keep such an issue open, but a PR would be welcome.

@jakebailey jakebailey added the External Relates to another program, environment, or user action which we cannot control. label May 16, 2023
@microsoft-github-policy-service

This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

@microsoft-github-policy-service

This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External Relates to another program, environment, or user action which we cannot control.
Projects
None yet
Development

No branches or pull requests

3 participants