Supporting type self
or something that can represents the current instance.
#2179
Labels
Duplicate
An existing issue was already created
When I am writing a declaration file, I found it really frustrating repeating the inherited method that returns the instance itself for a correct return type.
E.g. for animation library GSAP, many classes are inherited from class
Animation
, I have to repeat almost every method to update return typeAnimation
to the current class.It would be great if we may use some type like
self
to make this easier, like this:The text was updated successfully, but these errors were encountered: