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: type resolution when moduleResolution is nodenext or bundler #17319

Closed
wants to merge 1 commit into from

Conversation

ml1nk
Copy link

@ml1nk ml1nk commented May 8, 2023

Same as #17305 but add types to alle exports as .mjs automatically resolves to .d.mts not d.ts.

Closes #15885

@KaelWD
Copy link
Member

KaelWD commented May 8, 2023

.mjs automatically resolves to .d.mts not d.ts

Can we just emit .d.mts files then? Support for that seems to have been added at the same time as package exports, so presumably typescript 4.7 is already the minimum requirement anyway.

@ml1nk
Copy link
Author

ml1nk commented May 8, 2023

Yeah, this should also work without bloating "package.json". Normally nobody should use the .d.ts files directly, but as "./": "./" exports everything it could be interpreted as a breaking change.

@johnleider johnleider requested a review from KaelWD May 9, 2023 16:26
@KaelWD
Copy link
Member

KaelWD commented May 10, 2023

I'll do that then.

@KaelWD KaelWD closed this May 10, 2023
@ml1nk
Copy link
Author

ml1nk commented May 19, 2023

@KaelWD In the current release (3.3.0) there is still a typing issue, as it tries to find the typing in ./lib/framework.d.mts as it ignores typesVersions and types.

image
image
image

error TS2688: Cannot find type definition file for 'vuetify'.
  The file is in the program because:
    Entry point of type library 'vuetify' specified in compilerOptions

  tsconfig.json:27:7
    27       "vuetify"
             ~~~~~~~~~
    File is entry point of type library specified here.

@ml1nk
Copy link
Author

ml1nk commented May 19, 2023

Sorry for not seeing this naming mismatch earlier.

@KaelWD
Copy link
Member

KaelWD commented May 19, 2023

lmao why do I even bother with nightly releases

fixed in 89ac54c

@ml1nk
Copy link
Author

ml1nk commented May 19, 2023

lmao why do I even bother with nightly releases

I completely overlooked that there is a nightly. Next time...

Thank you for the fix.

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.

[Feature Request] Add support for moduleResolution: NodeNext in v3
2 participants