-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Spec inconsistency for type aliases #17287
Comments
It can interface A { x:number;}
interface B extends A { y:number;}
Spec now is in stale state. |
You're right. I meant the
So is the spec going to be updated, or it is abandoned for the sake of faster development? |
See #17215 (comment) |
Type alias is like named references to any kind of type (primitive types, object types, union types, intersection types, mapped types), interface is like named reference to object type. You can't extend (in the sense of adding extensions to the existed class) class with an alias but with an interface can. Declaration merging is working for interfaces (class and interface, interface and interface) and enums, namespaces. import {A} from "./a"
declare module './i' {
interface A {
f2():void;
}
}
A.prototype.fn2 = function() {
}; By the way, spec doesn't contain that. |
I believe this was a change we made where if a type reference resolves to an object type, then you can use it in an implements clause. Thanks for reporting! |
The spec is now an "archived" artifact and we won't be tracking defects against it anymore. |
Specification, chapter 3.10:
This contradicts the actual behaviour seen in current Playground:
extends
clauseimplements
clause as well as an interfaceThe text was updated successfully, but these errors were encountered: