46 lines
994 B
TypeScript
46 lines
994 B
TypeScript
|
class Doing {
|
||
|
public static staticMethod() {
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class Other extends Doing {
|
||
|
// in static method
|
||
|
public static staticMethod() {
|
||
|
super.staticMethod();
|
||
|
}
|
||
|
|
||
|
// in a lambda inside a static method
|
||
|
public static lambdaInsideAStaticMethod() {
|
||
|
() => {
|
||
|
super.staticMethod();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// in an object literal inside a static method
|
||
|
public static objectLiteralInsideAStaticMethod() {
|
||
|
return {
|
||
|
a: () => {
|
||
|
super.staticMethod();
|
||
|
},
|
||
|
b: super.staticMethod()
|
||
|
};
|
||
|
}
|
||
|
|
||
|
// in a getter
|
||
|
public static get staticGetter() {
|
||
|
super.staticMethod();
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
// in a setter
|
||
|
public static set staticGetter(value: number) {
|
||
|
super.staticMethod();
|
||
|
}
|
||
|
|
||
|
// in static method
|
||
|
public static initializerInAStaticMethod(a = super.staticMethod()) {
|
||
|
super.staticMethod();
|
||
|
}
|
||
|
}
|