-
Notifications
You must be signed in to change notification settings - Fork 13.3k
TypeScript incorrectly handles naughty strings in jsonΒ #53519
Copy link
Copy link
Closed
Labels
Milestone
Description
Bug Report
π Search Terms
bad naughty json string
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about bad strings in json
β― Playground Link
Playground link with relevant code
When you enter the playground, an alert message will appear:

Click at 'Cancel', otherwise, you'll not see the errors at the errors tab.
π» Code
Code here will tell you nothing, you should see the playground above. Don't worry, it's not complicated at all.
π Actual behavior
There are several errors reported by the compiler, you can see them in the image below:

π Expected behavior
I believe the compiler should be able to correctly handle these potencial problematic strings.
Reactions are currently unavailable