Skip to content
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

Wrong Flow type of joinClasses arguments #336

Open
claudiopro opened this issue Feb 1, 2019 · 3 comments
Open

Wrong Flow type of joinClasses arguments #336

claudiopro opened this issue Feb 1, 2019 · 3 comments

Comments

@claudiopro
Copy link
Contributor

The Flow type of joinClasses arguments is mixed with arity 1, but in reality it is variadic as it accepts a list of strings. The most immediate fix I can think if is to change it to ...classNames: Array<mixed>

function joinClasses(className: mixed): string {

@claudiopro
Copy link
Contributor Author

Found while debugging facebookarchive/draft-js#1988

@zpao
Copy link
Member

zpao commented Feb 1, 2019

Really we should bring out latest from www (for this and others) which has better types. To do everything starts to get pretty messy, I have some in progress work from a while back, tracking down what each of our projects was actually using and syncing minimal module.

function joinClasses(className?: ?string, ...classes: Array<?string>): string {

@claudiopro
Copy link
Contributor Author

That's great to hear @zpao! What can I do to help?

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

No branches or pull requests

2 participants