Skip to content

Conversation

@zpao
Copy link
Contributor

@zpao zpao commented May 6, 2019

While these are disallowed in Flow, typeof Array is a valid type,
which could trigger this.

Rather than try to enumerate other possible cases, I simply check to
make sure we don't crash when we hit them.

While these are disallowed in Flow, `typeof Array` is a valid type,
which could trigger this.

Rather than try to enumerate other possible cases, I simply check to
make sure we don't crash when we hit them.
}
},

// While this isn't valid flow, we shouldn't disallow it.
Copy link
Owner

Choose a reason for hiding this comment

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

What is the use case for this if it isn't valid Flow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mostly just a sanity check to check that the code won't break. I'm not attached to it at all.

@gajus gajus merged commit 05a7281 into gajus:master May 8, 2019
@gajus
Copy link
Owner

gajus commented May 8, 2019

🎉 This PR is included in version 3.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 8, 2019
kangax pushed a commit to kangax/eslint-plugin-flowtype that referenced this pull request May 17, 2019
While these are disallowed in Flow, `typeof Array` is a valid type,
which could trigger this.

Rather than try to enumerate other possible cases, I simply check to
make sure we don't crash when we hit them.
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.

2 participants