Methods of classes extended in others do not inherit the types of method arguments. #58611
Closed
1 task done
Labels
Duplicate
An existing issue was already created
Acknowledgement
Comment
TypeScript Version: 5.3.3
When extending a class and overriding a method in the new class, it does not inherit the types of the original method, however, it forces you to maintain the same arguments, the same types, async and the same return, making it necessary to re-write the typing.
If something is required to be exactly the same thing, both arguments and return, shouldn't it automatically inherit the types?
Example:
Works:
The text was updated successfully, but these errors were encountered: