Closed mlegenhausen closed 6 years ago
@mlegenhausen ok for the typescript upgrade, but why "io-ts": "^1.4.0"
? Could you please explain
The current npm version is not compatible with io-ts@1.4.0 cause it still uses mixed instead of unknown
t.mixed
is unknown
If I don't upgrade io-ts
I get the following error in combination with io-ts@1.4.0
// src/types.ts
createOptionFromNullable(t.string)
// src/types.ts(10,41): error TS2345: Argument of type 'StringType' is not assignable to parameter of type 'Type<string, any, mixed>'.
If I upgrade to io-ts@1.4.0
the mixed
changed to the correct unknown
type.
Ah ok the problem is that two version of io-ts
get installed. io-ts@1.4.0
which I use directly and io-ts@1.1.4
which is defined by io-ts-types
.
Ok solved the problem of the duplicate io-ts
installation now everything works. Only the update to typescript@3.0.1
is necessary.
The current npm version is not compatible with
io-ts@1.4.0
cause it still usesmixed
instead ofunknown
.This pull request fixes this issue by upgrading to
io-ts@1.4.0
and increase the minimum typescript version to3.0.1
. When now build the typings include the correctunknown
type.