So I am using this library https://github.com/piotrwitek/typesafe-actions. It has a method createAction with the following API.
createAction('action type', (resolve) => (payload: payloadType) => resolve(payload));
Now if i do
createAction('action type',(resolve) => <T extends someType>(payload: payloadType<T>) => resolve(payload));
It simply fails. It infers type as payloadType<someType>
instead of payloadType<T extends someType>
.
Am I the only one having this issue. As a workaround i did implement a getter function but seems like a hack.
Any help on the same would be highly appreciated.