Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix example imports #3171

Conversation

frankie303
Copy link
Contributor

No description provided.

@jakebailey
Copy link
Member

Why change this? Extensions are legal, and even required in newer module modes.

@frankie303
Copy link
Contributor Author

@jakebailey I didn't know that js files can include types (in example, type is imported from js file). So I thought that was a mistake.

@jakebailey
Copy link
Member

TypeScript doesn't rewrite extensions; an import may say .js but point to a TS file, or that file may be .js but contain JSDoc or inferred types under allowJs.

@jakebailey jakebailey closed this Jun 30, 2024
@frankie303
Copy link
Contributor Author

Thank you so much for the explanation!

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