Is there a way for me to return a generic type as a string in this function?
const actionName = <P extends string>(path: P) => <A extends string>(action: A): string => `${path}/${action}`;
const path = actionName('filter');
const action = actionName('OPEN');
The expected type in action
is 'filter/OPEN'
, but I am only getting 'OPEN'