I recently started working with TypeScript, and my WebStorm IDE has endowed me with the possibility of using a static modifier ...
export default class MyClass {
public bar(): any {
}
private foo(a: any, b: any): any {
}
}
Here I would receive a warning about what foo(a, b)might be announced static. At the moment, I have turned off this "warning", since I mainly consider the liberal use of statics as a "smell of code", but again I am not an expert in TypeScript.
Are there any significant “side benefits” of using a static modifier? Besides what he does in the definition .
source
share