Public static fields in TypeScript should be declared as readonly to prevent them from being modified after their initial
assignment. This is a good practice because it makes the code safer by preventing accidental changes to these fields, which could lead to bugs that
are hard to detect and fix.
class MyClass {
static myField = 42; // Noncompliant
}
To fix this, declare you static field with the readonly qualifier .
class MyClass {
static readonly myField = 42;
}