Skip to content

Fix multiple jscompiler errors#26632

Open
stephenduong1004 wants to merge 2 commits intoemscripten-core:mainfrom
stephenduong1004:patch-7
Open

Fix multiple jscompiler errors#26632
stephenduong1004 wants to merge 2 commits intoemscripten-core:mainfrom
stephenduong1004:patch-7

Conversation

@stephenduong1004
Copy link
Copy Markdown
Contributor

Fix the following errors after #26424:

- ERROR - [JSC_BAD_JSDOC_ANNOTATION] Parse error. illegal use of unknown JSDoc tag "noreturn"; ignoring it. Place another character before the @ to stop JSCompiler from parsing it as an annotation.
- ERROR - [JSC_USED_GLOBAL_THIS] dangerous use of the global this object.
- ERROR - [JSC_MISSING_RETURN_STATEMENT] Missing return statement.

#if ASSERTIONS && !('$FS' in addedLibraryItems)
// show errors on likely calls to FS when it was not included
var FS = {
/** @return {*} */
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

does @return {undefined} work here?

mkdev() { FS.error() },
createLazyFile() { return (/** @type {?} */ (FS.error())); },
open() { return (/** @type {?} */ (FS.error())); },
mkdev() { return (/** @type {?} */ (FS.error())); },
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you know why the JS compiler if reporting Missing return statement here? Why is it expecting this method to return anything at all?

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