Skip to content

fix: add types to exports field to be compatible with nodenext module resolution #1522

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 28, 2021

Conversation

otakustay
Copy link
Contributor

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

Using typescript@4.6.0-dev.20211225 and "moduleResolution": "nodenext" we are unable to resolve types of socket.io-client

New behaviour

Make TypeScript successfully resolve types

Other information (e.g. related issues)

See microsoft/TypeScript#46770 (comment) for detail, in nodenext module resolution it requires a types field in exports with full filename including extension

… resolution

See microsoft/TypeScript#46770 (comment) for detail, in `nodenext` module resolution it requires a `types` field in `exports` with full filename including extension
@otakustay otakustay mentioned this pull request Dec 26, 2021
11 tasks
@darrachequesne darrachequesne merged commit 19836d9 into socketio:master Dec 28, 2021
@darrachequesne
Copy link
Member

@otakustay thanks!

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

Successfully merging this pull request may close these issues.

2 participants