The ESM test io-ts.test.ts
shows that this now works import * as IO from 'https://esm.sh/io-ts
.
However, due to the architecture of io-ts
in almost all cases it is necessary to import sub-modules directly, e.g. import * as T from 'https://esm.sh/io-ts/Types
, which does not yet work as demonstrated by io-ts-schemable.test.ts (a slight modification from the original test).
On a high-level, the issue is that most of io-ts's sub-modules depend on io-ts/Schemable
which, for some reason, cannot be compiled and throws with TS2370 [ERROR]: A rest parameter must be of an array type.
.
Why it cannot be compiled is unexpected, because if we reproduce the io-ts/Schemable
types directly (see io-ts-rest-parameter.test.ts) it does not throw any errors as one would expect.
- clone repo
- run
deno test