Typescript Private or protected member 'something' cannot be accessed on a type parameter Typescript Private or protected member 'something' cannot be accessed on a type parameter typescript typescript

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"]> {   }}

Playground Link