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

EventEmitter import breaks TypeScript #195

Closed
AhmedToInfinity opened this issue Aug 30, 2023 · 0 comments
Closed

EventEmitter import breaks TypeScript #195

AhmedToInfinity opened this issue Aug 30, 2023 · 0 comments

Comments

@AhmedToInfinity
Copy link

AhmedToInfinity commented Aug 30, 2023

I left a similar comment on a previously opened issue from a couple years ago: #146 (comment)

Since this has not been addressed, I'm opening another issue.

The problem is that EventEmitter v4 (currently used version here) does not have an export default, causing this to break when using TypeScript without the esModuleInterop or allowSyntheticDefaultImports set to true. This should not be required, and this import can be handled correctly.

There are 2 options:

  1. Stay on the current EventEmitter v4 and in source\index.ts, update the first line to import * as EventEmitter from 'eventemitter3';
  2. Upgrade to EventEmitter v5 (note: the breaking changes will not affect this repo), and either:
  • keep the import as is
  • OR, update it to import { EventEmitter } from 'eventemitter3' (preferred syntax)
  • NOTE: either way works since v5 supports both here

Please make either of these very quick changes, or I cannot upgrade p-queue to v7 from v6. Thank you!

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