Open claudiopro opened 5 years ago
Found while debugging https://github.com/facebook/draft-js/issues/1988
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?
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>
https://github.com/facebook/fbjs/blob/d308fa83c99c93e8e588de3396cf55b31e56b14e/packages/fbjs/src/core/joinClasses.js#L17