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

[Type-definitions] Fix type generator to support import maps #16890

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

stof
Copy link
Contributor

@stof stof commented Aug 31, 2023

This fixes #16705 fully by making typescript aware of the import map when generating type declarations.

tsconfig.json Outdated Show resolved Hide resolved
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.
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a 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 Snuffleupagus merged commit 87ea2ed into mozilla:master Sep 1, 2023
3 checks passed
@stof stof deleted the fix_type_generator branch September 1, 2023 10:24
@stof
Copy link
Contributor Author

stof commented Sep 1, 2023

@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.

@Snuffleupagus
Copy link
Collaborator

Nowadays releases usually happen on the last Sunday of every month, unless something unforeseen happens.

@stof
Copy link
Contributor Author

stof commented Sep 1, 2023

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request for help from TypeScript users] Re-enable gulp typestest in GitHub Actions
2 participants