-
Notifications
You must be signed in to change notification settings - Fork 10k
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
[Type-definitions] Fix type generator to support import maps #16890
Conversation
d21eb2a
to
c958800
Compare
Some configurations settings like `paths` cannot be provided through CLI arguments but only in a configuration file. And when using a configuration file, only a few options (like `--outDir` can still be provided) through the CLI.
The typescript compiler is now configured to know about the import map to be able to resolve those imports and find the associated types. As tsc outputs declaration files using the original module identifiers and not the resolved ones, tsc-alias is used to post-process the declaration files by resolving those paths.
This reverts commit d9350c3.
c958800
to
46f2c58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, not really knowing TypeScript, this seems to work just fine.
r=me, thank you!
@Snuffleupagus is there any ETA for the next release that would ship non-broken types again ? As I'm new to this project, I don't know how the release schedule is managed. |
Nowadays releases usually happen on the last Sunday of every month, unless something unforeseen happens. |
thanks |
This fixes #16705 fully by making typescript aware of the import map when generating type declarations.