joanllenas / ts.data.json

1.7kB JSON decoding library for Typescript
BSD 3-Clause "New" or "Revised" License
205 stars 16 forks source link

Eliminated instanceof checks against classes defined within the library #16

Closed martinslota closed 4 years ago

martinslota commented 4 years ago

We recently hit a problem where the same version of the library was loaded twice and decoders were passed from one side to the other. This led to obscure errors because of instanceof checks which don't work as expected when there are several versions of the Ok class.

This PR attempts to address the problem - it's just one way to try tackling it.

joanllenas commented 4 years ago

https://github.com/joanllenas/ts.data.json/releases/tag/v1.0.1

Thanks for your contribution!