Typescript: how to get the property of a extracted union type by the value of function parameter
I am wondering if there’s a way could let ts compiler determine the type of callback in useListenAPI
as
I am wondering if there’s a way could let ts compiler determine the type of callback in useListenAPI
as