mattpocock / ts-reset

A 'CSS reset' for TypeScript, improving types for common JavaScript API's
https://www.totaltypescript.com/ts-reset
MIT License
7.9k stars 124 forks source link

Correct types for JSON.stringify #190

Open chribjel opened 8 months ago

chribjel commented 8 months ago

JSON.stringify has some caveats that is not in the standard Typescript implementation.

JSON.stringify(undefined) returns undefined, not string JSON.stringify(function(){}) returns undefinedas well.

This PR fixes that.

denis-sokolov commented 6 months ago

Tightly related: #21, #124.