Skip to content

TypeError when using in an app with moduleResolution nodenext #339

@v1adko

Description

@v1adko

When using the library in an app with moduleResolution "nodenext" in tsconfig I get an TS error.
Is it possible to use the library with this setting?
Maybe it's not related to the library itself and how it's built but to a configuration I need to change.

Reproduction repo link

Full error

src/useSWRV.ts:4:18 - error TS2349: This expression is not callable.
  Type 'typeof import("/Users/v1adko/Projects/Slippy/mono-test/vue-project/node_modules/swrv/dist/index")' has no call signatures.

const result = useSWRV("key", () => null);

Found 1 error in src/useSWRV.ts:4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions