-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" insteadDeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
I think that is useful to access to static members :
- from instances
- from sub classes
Below an example:
class A {
protected static type: string;
public log(): string {
console.log(this.type);
}
}
class B extends A {
protected static type: string = 'C';
}
class C extends A {
protected static type: string = 'C';
}
b = new B();
b.log(); // => 'B'
c = new C();
c.log(); // => 'C'
Metadata
Metadata
Assignees
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" insteadDeclinedThe issue was declined as something which matches the TypeScript visionThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScriptAn idea for TypeScript