ts-reset
ts-reset copied to clipboard
Correct types for JSON.stringify
JSON.stringify has some caveats that is not in the standard Typescript implementation.
JSON.stringify(undefined) returns undefined, not string
JSON.stringify(function(){}) returns undefined as well.
This PR fixes that.
Tightly related: #21, #124.