Skip to content

JSON.stringify(undefined) has wrong type #48492

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

Closed
iacore opened this issue Mar 30, 2022 · 2 comments
Closed

JSON.stringify(undefined) has wrong type #48492

iacore opened this issue Mar 30, 2022 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@iacore
Copy link

iacore commented Mar 30, 2022

lib Update Request

Configuration Check

My compilation target is ES2015 and my lib is the default.

Missing / Incorrect Definition

  • JSON.stringify

Sample Code

This will type check but shouldn't.

const s: string = JSON.stringify(undefined)

Documentation Link

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description

@whzx5byb
Copy link

Duplicate of #18879

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Mar 31, 2022
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' 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
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants