Closed Kinrany closed 4 years ago
Absolutely one up. io-ts
exports from index.
Was there a reason there is no export from index? @gcanti
@waynevanson IIRC the reason was that it would require all peer dependencies
{
"fp-ts": "^2.0.0",
"io-ts": "^2.0.0",
"monocle-ts": "^2.0.0",
"newtype-ts": "^0.3.2"
}
The peer dependencies are there either way, are they not? There's no machine-readable way to specify that you're only going to use a part of the library's surface.
According to the documentation at https://github.com/gcanti/io-ts-types#installation:
starting from 0.5.0 you must install
fp-ts
,io-ts
andmonocle-ts
manually (fp-ts
,io-ts
andmonocle-ts
are listed inpeerDependency
)
I feel like @Kinrany is correct; peer dependencies will need to be installed anyway.
@gcanti Should we wait until 0.6.0 is out, or should we do it beforehand?
Should we wait until 0.6.0 is out, or should we do it beforehand?
@waynevanson do it beforehand, there's no ETA for v0.6.0 at the moment
@gcanti wow time flies when you're having fun! I'll come back within a week advising where I'm at.
🚀 Feature request
I'd like to be able to import
io-ts-types
once and have all the codecs/combinators, like Ramda. AFAIK right now each thing must be imported from its own file.Current Behavior
Desired Behavior
Suggested Solution
Add index files with re-exports.
Who does this impact? Who is this for?
All users except those who import individual files for bundle size reasons.
Bundle size is not a concern on NodeJS, where
io-ts
can be used for validation.Describe alternatives you've considered
It would be ideal to just
import 'io-ts-types'
. Not sure if that's possible.Your environment