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

chore(jest-runtime): runtime.unstable_importModule should not return Promise<void> #12009

Merged
merged 1 commit into from
Oct 29, 2022

Conversation

chentsulin
Copy link
Contributor

@chentsulin chentsulin commented Oct 28, 2021

Summary

The linkAndEvaluateModule(...) method returns Promise<VMModule | void> , so unstable_importModule(...) should returns the same type.

Test plan

No. Just a simple type modification.

@@ -622,7 +622,7 @@ export default class Runtime {
async unstable_importModule(
from: Config.Path,
moduleName?: string,
): Promise<void> {
): Promise<VMModule | void> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! Module '"vm"' has no exported member 'Module'.

Maybe we should define it as any or unknown. Resolving void-only here is kind of misleading.

@github-actions
Copy link

This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Oct 28, 2022
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

sorry, missed this!

@SimenB SimenB changed the title fix(jest-runtime): runtime.unstable_importModule should not return Promise<void> chore(jest-runtime): runtime.unstable_importModule should not return Promise<void> Oct 29, 2022
@SimenB SimenB merged commit 54ce105 into jestjs:main Oct 29, 2022
@chentsulin chentsulin deleted the unstable_importModule-VMModule branch October 29, 2022 15:54
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants