I use typescript generics in my project but it seems not work well.
example:
interface Test { a?: (v: T) => P b?: (v: P) => void