Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.4.0] Type regression when node16 module/moduleResolution #196

Closed
AviVahl opened this issue Sep 2, 2023 · 0 comments
Closed

[7.4.0] Type regression when node16 module/moduleResolution #196

AviVahl opened this issue Sep 2, 2023 · 0 comments

Comments

@AviVahl
Copy link

AviVahl commented Sep 2, 2023

Starting with 7.4.0, the following steps:

mkdir pqueue-type
cd pqueue-type
npm init -y
npm i typescript p-queue
npx tsc --init --target es2022 --module node16 --moduleResolution node16 --skipLibCheck false
echo "import 'p-queue';" > index.ts
npx tsc --noEmit

Result in:

node_modules/p-queue/dist/index.d.ts:15:173 - error TS2507: Type 'typeof import("/home/avi/projects/pqueue-type/node_modules/eventemitter3/index")' is not a constructor function type.

15 export default class PQueue<QueueType extends Queue<RunFunction, EnqueueOptionsType> = PriorityQueue, EnqueueOptionsType extends QueueAddOptions = QueueAddOptions> extends EventEmitter<EventName> {
                                                                                                                                                                               ~~~~~~~~~~~~

Found 1 error in node_modules/p-queue/dist/index.d.ts:15

Saw this first here: wixplosives/pleb#620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant