fix: add .js extensions to .d.ts imports for node16 resolution#1083
Merged
robertsLando merged 1 commit intomainfrom Mar 27, 2026
Merged
fix: add .js extensions to .d.ts imports for node16 resolution#1083robertsLando merged 1 commit intomainfrom
robertsLando merged 1 commit intomainfrom
Conversation
… resolution Closes #1082 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1083 +/- ##
=======================================
Coverage 99.47% 99.47%
=======================================
Files 15 15
Lines 1921 1921
=======================================
Hits 1911 1911
Misses 10 10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.jsextensions to all relative imports in.d.tstype definition filesmoduleResolution: "node16"failing to resolve types when importingaedesCloses #1082
Details
With
moduleResolution: "node16"and"type": "module", TypeScript strictly requires file extensions on relative imports. PR #1081 added thetypescondition topackage.jsonexports, allowing TypeScript to find the entryaedes.d.ts, but the internal relative imports within the.d.tsfiles still lacked.jsextensions, causing resolution failures.Files changed:
aedes.d.ts— entry point re-exportstypes/client.d.ts— imports frompacketandinstancetypes/instance.d.ts— imports fromclientandpackettypes/packet.d.ts— imports fromclienttest/types/aedes.test-d.ts— test import fromtypes/packetTest plan
npm run test:typescript(tsd) passes🤖 Generated with Claude Code