Skip to content

Conversation

mezozawahra
Copy link

@mezozawahra mezozawahra commented Apr 23, 2025

Description:
1- added the extension .js to all import paths inside declaration files.
2- added index.js to directory imports, i.e import "./atn" became import "./atn/index.js"

This should be a harmless method since both commonjs and esm support it.
Edit:

  • sorry this my first contribution I forced pushed signing the commit change

@mezozawahra mezozawahra changed the title - Typescript runtime: adding .js to to imports in d.ts files - Typescript runtime: adding .js to imports in d.ts files Apr 23, 2025
@manan-jadhav-ab
Copy link

+1

@mezozawahra
Copy link
Author

@ericvergnaud Hi Sir, Sorry for the inconvenience.
This typing fix should support both CommonJs and ES modules, so should I rename index.d.cts to index.d.ts (even though it works fine for now without naming)?
again sorry for disturbing you, and thank you for you great work.

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