facebook/fbjs

Wrong Flow type of joinClasses arguments

claudiopro opened this issue · 3 comments

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 {

zpao commented

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 {

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