I am looking for the equivalent of the following c# syntax for typescript
public abstract class PBaseHierarchical<T> : PBase where T : PBaseHierarchical<T>
{
...
}
I only find the constraint "extends" which would be the following in typescript:
export abstract class PBaseHierarchical<T extends PBaseHierarchical<T>> extends PBase {
...
}
But from my understanding "extends" says that T should inherit from PBaseHierarchical. What I want is that T is of type PBaseHierarchical.
Thanks a lot for any help !
extendsin type constraint is actually covers both: is of type PBaseHierarchical or "extends" PBaseHierarchical. Pretty much the same aswhere T : PBaseHierarchicalin c#