Closed joeltg closed 2 years ago
@gcanti do you have time to look into this?
@joeltg @lkj4 I can't reproduce with typescript@4.7.3
There is another 4.7 related error in #644 Not sure if they are related, but with 4.7 came some changes/improvements to the type inference, so there might be a connection.
It works in TypeScript 4.7.4
but it does not work in: 4.8.0-beta
, 4.8.1-rc
, and 4.8.2
. So it's again broken in the latest TypeScript 4.8.
🐛 Bug report
This is a separate issue from #644, not related to ESM compatibility (as far as I can tell).
Current Behavior
io-ts
fails to compile under the new TypeScript 4.7 beta.Expected behavior
io-ts
compiles without emitting any errors.Reproducible example
package.json
:tsconfig.json
:index.ts
:Suggested solution(s)
The errors show a couple suggestions but I don't understand them very well.
Additional context
Your environment
Which versions of io-ts are affected by this issue? Did this work in previous versions of io-ts?