Issue when using distributive conditional types combined with generic method
问题 I've been trying to make a generic function which receives and object T and receives a string property name of that object T. I used https://www.typescriptlang.org/docs/handbook/advanced-types.html as an example (section: Distributive conditional types) I've come up with a solution that works without generics, but when I change the explicit types to a generic type typescript won't compile. This is the non-generic version: export type TypedPropertyNames<T, P> = { [K in keyof T]: T[K] extends P