gcanti / io-ts-types

A collection of codecs and combinators for use with io-ts
https://gcanti.github.io/io-ts-types/
MIT License
311 stars 40 forks source link

fp ts bare import #137

Closed osdiab closed 4 years ago

osdiab commented 4 years ago

As of https://github.com/gcanti/fp-ts/pull/1241 we can import directly from fp-ts to allow the bundler to decide which bundle to use. This applies the same build structure and output as fp-ts.

ES6 and lib folders are placed in a dist/ directory, each module has its own package.json declaring main, module, and typings.

osdiab commented 4 years ago

docs-ts is failing from this:

docs/examples/src-clone.ts-clone-0.ts (2,23): Cannot find module 'io-ts-types/lib/clone' or its corresponding type declarations. (2307)

will look into it a bit later, time short right now

osdiab commented 4 years ago

ah, just had some stray files in my directory, npm test fully succeeds.

osdiab commented 4 years ago

I just emulated what was going on in fp-ts including copying over its scripts (maybe that should be exported as a library as well, as the same thing could be dumped into io-ts itself too), would love a pair of eyes that this makes sense @gcanti ! Thanks for the great project.

osdiab commented 4 years ago

npm run test passes fully and the output directory looks correct.

osdiab commented 4 years ago

Ready for review @gcanti !

gcanti commented 4 years ago

Thanks @osdiab