Open sroucheray opened 5 years ago
This seems to me a marginal improvement over Pick<C, keyof C>
declare class C {
private foo(): void
public bar(): void
}
// No need to implement private method foo !
class D implements Pick<C, keyof C> {
public bar() { }
}
Good point, alternate implementation:
type PublicOf<T> = Pick<T, keyof T>;
I'm trying a contribution, I'm not sure that my pull request #31970 is valid but I'm still trying.
Suggestion
Add the
PublicOf
type suggested in this issue's comment by @DanielRosenwasserUse Cases
Implement a
class
public properties/methods without the need to implement private/protected ones.Examples
Checklist
My suggestion meets these guidelines: