parallel.js icon indicating copy to clipboard operation
parallel.js copied to clipboard

Is it possible to use such function: (data: N) => T as the parameter of the map method?

Open zhengger opened this issue 3 years ago • 0 comments

I'm using Typescript. The current map only accepts functions like : fn: (data: N) => N. But in practice, I need to feed the map with function like : (data: N) => T. T is not the same type as N. Could you tell me how to do it? Thank you so much!

public map<N>(fn: (data: N) => N): Parallel<T> 

zhengger avatar Aug 30 '21 17:08 zhengger