-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect extend errors since v2.4 update #17123
Comments
Noticed this: abstract class Container<T> {
erase<U extends T>(begin: Iterator<U>, end: Iterator<U>): Iterator<T>;
}
abstract class SetContainer<T> extends Container<T> {
erase(begin: SetIterator<T>, end: SetIterator<T>): SetIterator<T>;
} You need |
I am getting this "incorrectly extends..." error too. However, my classes are not that simple and I cannot seem to be able to identify what exactly is wrong. It compiled fine in TypeScript 2.3. Is it possible to include more specific reason why TypeScript thinks it incorrectly extends parent class? |
@MatejQ Usually TypeScript will drill down into the method that extends the base method incorrectly; maybe the tool you're using to display errors is hiding this? Try running |
@andy-ms thanks, that really helped. I had to set the output of MSBuild in visual studio to detailed and then I got all the specific messages from tsc. I hope this helps someone else too. |
based on #17123 (comment), this seems like the expected behavior. |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
I've been publishing a library compiled by the
TypeScript
. Since thev2.4
update, my library fails to compile throwing such error:It was not a problem to extending a class and overriding some methods to return (or get parameter) sub-type of origin. Thus, below example code, there hasn't been any error until the
v2.3
. However, since thev2.4
update, below code throwsincorretly extends base class
error.I want to know that such errors, since
v2.4
, are by whether:The text was updated successfully, but these errors were encountered: