Similar to how TS has ReturnType, is it possible to have ArgumentType? Or an example of how to extract a function's arguments and specify a different return type?
Example, due to redux-pack changing this action to a promise
export function createMyPackActionWithArgs(arg1: string, arg2?: string) {
return { type: MY_PACK_ACTION, promise: fetchMyData() };
}
This technically returns a Promise when in component but an Object when reducer.
Similar to how TS has
ReturnType, is it possible to haveArgumentType? Or an example of how to extract a function's arguments and specify a different return type?Example, due to
redux-packchanging this action to a promiseThis technically returns a
Promisewhen in component but anObjectwhen reducer.