Skip to content

no-undefined-types: Treat GCC generic types as defined #283

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 7 commits into from
Jun 21, 2019

Conversation

l1bbcsg
Copy link
Contributor

@l1bbcsg l1bbcsg commented Jun 20, 2019

This pull request adds support for Google Closure Compiler Generic (aka Template) types to no-undefined-types.

Makes the following code valid:

/**
 * @template TEMPLATE_TYPE
 */
class Foo {
    /**
     * @return {TEMPLATE_TYPE}
     */
    bar () {
    }
}

While previously no-undefined-types reported TEMPLATE_TYPE in bar as undefined.

Copy link
Collaborator

@brettz9 brettz9 left a comment

Choose a reason for hiding this comment

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

I made a simplification (using flatMap). If you can also just add the invalid example as mentioned, I think this will be ready.

@brettz9 brettz9 force-pushed the no-undefined-types-add-gcc-templates branch from 4ea7444 to 2289eed Compare June 21, 2019 23:50
@brettz9 brettz9 merged commit 4ac598c 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
@l1bbcsg l1bbcsg deleted the no-undefined-types-add-gcc-templates branch June 23, 2019 14:56
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