Skip to content

TypeScript types are wrong when module is node16 #494

@dstaley

Description

@dstaley

When using concurrently in a project with module set to node16 (or nodeNext) in tsconfig.json, the default export of concurrently is not correct:

import concurrently from 'concurrently'
concurrently(); // This expression is not callable. Type 'typeof import("node_modules/concurrently/dist/src/index")' has no call signatures.

I believe this is due to the fact that the types field points to dist/src/index.d.ts for both the require and import fields in exports, which is not going to work since the files are two different module systems. You can see more compatibility issues here.

I'm happy to send in a PR to fix this in a few days, but I just wanted to throw the issue out there for awareness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions