You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree, maybe marking JSON.parse as pure was wrong since throwing errors is part of its interface. Note that this call is only removed because you are not reusing the result. Still, I think this should be changed and we should add a small test similar to your example so that this use case is not forgotten.
I get a feeling there is some thin line here we might cross at some point but yes, I guess you are correct. I think once we implement /*#IMPURE*/ annotations, see #1771 , we might at the same time finally start parsing /*#PURE*/ annotations so that people can make their JSON interactions tree-shakeable again.
Haven't find any existing issue for same. Sharing the REPL example, where
JSON.parse
statement has been removed from the code.Reproduce here
The text was updated successfully, but these errors were encountered: