Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 7, 2025

No description provided.

@sbc100 sbc100 requested a review from kripken October 7, 2025 21:36
@sbc100 sbc100 enabled auto-merge (squash) October 7, 2025 22:23
// We have already warned/errored about this function, so for the purposes of Closure use, mute all type checks
// regarding this function, marking ot a variadic function that can take in anything and return anything.
// (not useful to warn/error multiple times)
LibraryManager.library[symbol + '__docs'] = '/** @type {function(...*):?} */';
Copy link
Member

Choose a reason for hiding this comment

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

Is this not needed for some reason?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems like its no longer needed, since closure can see the ... in the function body I believe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since we are not always creating the stubs with new Function('...args') closure can see that the function variadic.

Copy link
Member

Choose a reason for hiding this comment

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

Interesting, thanks.

@sbc100 sbc100 disabled auto-merge October 7, 2025 23:37
@sbc100 sbc100 merged commit 9d98f81 into emscripten-core:main Oct 7, 2025
31 of 33 checks passed
@sbc100 sbc100 deleted the stub_function branch October 7, 2025 23:38
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.

2 participants