esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

Failed to import - io-ts (sub-modules)

Open MichaelHirn opened this issue 3 years ago • 2 comments

Failing module

  • GitHub: https://github.com/gcanti/io-ts
  • npm: https://www.npmjs.com/package/io-ts

#274 fixed importing io-ts/index.ts, however due to architecture of the library almost everyone needs to import one of its submodules, e.g. io-ts/Type which does not yet work.

import * as T from 'https://esm.sh/io-ts/Type'

I created a repo with test files to reproduce error here.

Error message

After running deno run I got this:

error: TS2370 [ERROR]: A rest parameter must be of an array type.
    ...components: {
    ^
    at https://cdn.esm.sh/v72/[email protected]/lib/Schemable.d.ts:63:5

TS2370 [ERROR]: A rest parameter must be of an array type.
    ...components: {
    ^
    at https://cdn.esm.sh/v72/[email protected]/lib/Schemable.d.ts:124:5

TS2370 [ERROR]: A rest parameter must be of an array type.
    ...components: {
    ^
    at https://cdn.esm.sh/v72/[email protected]/lib/Schemable.d.ts:188:5

Found 3 errors.

Additional info

  • esm.sh version: 72
  • Deno version: 1.20.1

MichaelHirn avatar Mar 22 '22 12:03 MichaelHirn

oh, i will take a look

ije avatar Mar 22 '22 12:03 ije

may or may not be related to #342

MichaelHirn avatar Jun 06 '22 18:06 MichaelHirn