Skip to content

fix(types): NodeNext-compatible import in fxp.d.ts (TS2834)#809

Open
tomquist wants to merge 1 commit intoNaturalIntelligence:masterfrom
tomquist:fix/nodenext-fxp-dts-ts2834
Open

fix(types): NodeNext-compatible import in fxp.d.ts (TS2834)#809
tomquist wants to merge 1 commit intoNaturalIntelligence:masterfrom
tomquist:fix/nodenext-fxp-dts-ts2834

Conversation

@tomquist
Copy link

@tomquist tomquist commented Mar 23, 2026

Summary

Fixes #808.

Under moduleResolution "node16" / "nodenext", TypeScript requires explicit file extensions on relative imports in .d.ts files. The ESM types entry (exports["."].import.types./src/fxp.d.ts) imported './pem', which triggers TS2834 for consumers with skipLibCheck: false.

This PR is similar to #810 but without the regression test.

Change

  • Update the type-only import in src/fxp.d.ts to './pem.js' (TypeScript resolves this to pem.d.ts, matching the emitted fxp.js pattern).

Verification

Local tsc with module / moduleResolution NodeNext, skipLibCheck: false, and files including src/fxp.d.ts + src/pem.d.ts completes with no errors.

Relative imports in declaration files must use explicit .js extensions
when consumers use moduleResolution node16/nodenext with skipLibCheck false.

Fixes NaturalIntelligence#808
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.

TS2834: fxp.d.ts imports './pem' without extension under NodeNext moduleResolution

2 participants