total-typescript / ts-reset

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

Use narrower type for JSON.parse #140

Closed peterjwest closed 1 year ago

peterjwest commented 1 year ago

Seems like using a narrower type here would be better, allowing users to do less type checking, since JSON is a pretty simple format.

Might also be worth exposing the JSON types for people to use.

I didn't attempt to update the docs, just putting forward the idea for now!

mattpocock commented 1 year ago

Thanks Pete! But closing because of the reasons specified in #10

https://github.com/total-typescript/ts-reset/issues/10