Typescript Private or protected member 'something' cannot be accessed on a type parameter
This can easily solved by using the class name instead of this
:
class SomeClass { protected someMethod(): void { } protected someOtherMethod(): ReturnType<SomeClass["someMethod"]> { }}