Skip to content

Conversation

AviVahl
Copy link

@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.

2 participants