-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Do not report errors for classes and interfaces merging #5290
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
Conversation
|
||
|
||
var bar = new Bar(); | ||
bar.classFooMethod().interfaceFooMethod().classBarMethod().classFooMethod(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of expected the last method to be interfaceBarMethod();
since all the others are used and classFooMethod()
appears twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
One small comment, otherwise 👍 |
// Checking class with other things in type space not value space | ||
|
||
// class then interface | ||
class c11 { // error | ||
~~~ | ||
!!! error TS2518: Only an ambient class can be merged with an interface. | ||
foo() { | ||
return 1; | ||
} | ||
} | ||
|
||
interface c11 { // error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove // error
comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
👍 |
Do not report errors for classes and interfaces merging
As discussed in #5269, this removes the restriction for non-ambient classes merging with interfaces.