Skip to content

require-returns-check: Skip interface class methods #282

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

Merged
merged 4 commits into from
Jun 21, 2019

Conversation

l1bbcsg
Copy link
Contributor

@l1bbcsg l1bbcsg commented Jun 20, 2019

As per jsdoc @interface tag description, class marked with this tag should denote that all members of the class are interface symbols and therefore functions can have @returns tag, but no function body with return statement.

This pull request makes the following code valid:

/**
 * @interface
 */
class Foo {
    /**
     * @returns {string}
     */
    bar () {}
}

While previously require-returns-check reported bar as missing return value;

@brettz9 brettz9 merged commit ffecc96 into gajus:master Jun 21, 2019
@gajus
Copy link
Owner

gajus commented Jun 22, 2019

🎉 This PR is included in version 8.4.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Jun 22, 2019
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.

3 participants