fbjs icon indicating copy to clipboard operation
fbjs copied to clipboard

flow file rewriting results in invalid type annotation

Open zpao opened this issue 8 years ago • 2 comments

In compactArray we have

function compactArray<T>(
  array: Array<?T>
): Array<T> {

But it's getting rewritten by babel to

function compactArray<T>(array: Array<?TT>): Array<T> {

This is likely a bug in babel's printer but it's impacting us so we should try to own this. @samwgoldman - interested? (also cc @kittens because maybe it would take you 2 seconds). & cc @steveluscher since it's hitting Relay right now.

zpao avatar Mar 04 '16 18:03 zpao

Oh, @samwgoldman called this out explicitly in 7baf1ffcf2d21784437aba56d50daabd81a92faf and I missed that and reverted the annotation. I'll just put it back to what it was changed to and add this to my mental list of things to revert manually next sync (until the babel bug is fixed)

zpao avatar Mar 04 '16 19:03 zpao

;)

samwgoldman avatar Mar 04 '16 22:03 samwgoldman