Closed
Description
Is there any magic (without insane generics) to define a type that matches 'this'?
For example...
class A {
me():A {
return this;
}
}
class B extends A {
otherThing():void{}
me():B {
return this;
}
}
Instead of overriding me()
can I define a type without adding another generic declaration that simply solves the type of me()
?