I've been following an article about Lodash, Why using _.chain is a mistake, and it highlights that you can remove the need for chain by using Flow.
The example given is the following using chain
import _ from "lodash";
_.chain([1, 2, 3])
.map(x => [x, x*2])
.flatten()
.sort()
.value();
can be converted to the following using flow
import map from "lodash/fp/map";
import flatten from "lodash/fp/flatten";
import sortBy from "lodash/fp/sortBy";
import flow from "lodash/fp/flow";
flow(
map(x => [x, x*2]),
flatten,
sortBy(x => x)
)([1,2,3]);
However, when I implement this using TypeScript, I get the following error
Object is of type 'unknown'.ts(2571)
Is there any way to fix this so that TypeScript knows which types it is dealing with?

