-
Notifications
You must be signed in to change notification settings - Fork 747
Open
Description
Note: This is a refiling of microsoft/TypeScript#60871 in accordance to the instructions to follow after being closed in microsoft/TypeScript#62827.
Search Terms
mixins overrides, documentation dropped
Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about documentation, mixins, etc.
Playground
Code
declare class BaseClass {
/** some documentation */
static method(): number;
}
type AnyConstructor = abstract new (...args: any[]) => object
function Mix<T extends AnyConstructor>(BaseClass: T) {
abstract class MixinClass extends BaseClass {
constructor(...args: any[]) {
super(...args);
}
}
return MixinClass;
}
// Or more simply you can write:
class MixinClass {}
declare function Mix<T extends AnyConstructor>(BaseClass: T): typeof MixinClass & T;
declare class Mixed extends Mix(BaseClass) {
static method(): number;
}
Mixed.method;
// ^ No documentation.Actual behavior
Overrides of a mixin class does not have documentation.
Notably if you don't override the method the documentation does show up. This shows it's possible to get it.
Expected behavior
It should inherit documentation.
Metadata
Metadata
Assignees
Labels
No labels