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

fix: improve compat with ts in node16/bundler mode #689

Merged
merged 1 commit into from Aug 17, 2023

Conversation

AviVahl
Copy link
Contributor

@AviVahl AviVahl commented Aug 14, 2023

When using the newer resolution and module modes of typescript, it could pick up ./wrapper.mjs, which does not have a .d.ts file next to it.

Added the "types" condition to ensure imports to "engine.io" always get a type, no matter if they are sourced in commonjs or esm.

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

Cannot find types for package in these newer modes.

New behaviour

Works as expected. Types load.

Other information (e.g. related issues)

Change is backward compatible.

when using the newer resolution and module modes of typescript, it could pick up `./wrapper.mjs`, which does not have a `.d.ts` file next to it.

added the `"types"` condition to ensure imports to `"engine.io"` always get a type, no matter if they are sourced in commonjs or esm.
@darrachequesne darrachequesne merged commit c6bf8c0 into socketio:main Aug 17, 2023
@darrachequesne
Copy link
Member

@AviVahl thanks 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants