jorinvo / edn-data

EDN parser and generator that works with plain JS data, with support for TS and node streams
MIT License
96 stars 5 forks source link

TypeScript return type of parse function can depend on the passed options #5

Open jorinvo opened 4 years ago

jorinvo commented 4 years ago

We could further restrict the return type by parametrizing the function and using a conditional type on the options for parsing the different data types.

This would help a user of the library since they then need less checks on the returned data.