@flowtype How to define a type of return of a fn based on an argument string? Asked twice on SO - Thanks stackoverflow.com/questions/β¦ #flowtype
1
1
The intersection approach is a good one. You could also use $ElementType with a utility map type: flow.org/try/#0CYUwxgNghgTiAβ¦
4
1
Also is there any utility that extracts the return of a function? const a = ():number => 6; $returnOf<a> would then be number.
Aug 25, 2017 Β· 5:27 PM UTC


