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

end runtime imports of other packages for types #9076

Merged
merged 4 commits into from
Mar 12, 2024
Merged

Conversation

turadg
Copy link
Member

@turadg turadg commented Mar 12, 2024

closes: #6512

Description

@dckc proposed another trick : making a file that's picked up by tsconfig's glob but not ever imported itself. Whatever ambient types that file imports get picked up by the type checker. This only works for the particular tsconfig, but I thought it was worth seeing how it would help with #6512.

Turns out that since that was filed the repo has improved such that we don't need any ambient imports of other packages. (Found by agoric/.*types regexp in .js files) There's one case with a test relying on @agoric/vats/src/core/utils.js not getting the types that entails, but simply having that module import the types solves that problem.

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

none

Testing Considerations

Make sure there's no reduction in type coverage. I ran update-type-coverage.sh before the changes and committed that. After all the changes I ran again and nothing change.

Upgrade Considerations

none

@turadg turadg requested a review from dckc March 12, 2024 18:17
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Mar 12, 2024
@mergify mergify bot merged commit 6793c14 into master Mar 12, 2024
74 checks passed
@mergify mergify bot deleted the 6512-ambient-types branch March 12, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

End runtime imports of types modules
2 participants