this
JS-0105203 return /[{([]/.test(this.lineText);
204 }
205
206 private cleanText(text: string): string {207
208 // invert the quotes inside the selected text
209 if (config.getConfig().get("prints.useDoubleQuotes")) {
If a class method does not use this
, it can sometimes be made into a static function. If you do convert the method into a static function, instances of the class that call that particular method have to be converted to a static call as well (MyClass.callStaticMethod())
class Person {
sayHi() {
const greeting = document.createElement("div");
greeting.innerText = "Hello!";
document.appendChild();
}
}
const person = new Person();
person.sayHi();
class Person {
static sayHi() {
const greeting = document.createElement("div");
greeting.innerText = "Hello!";
document.appendChild();
}
}
Person.sayHi();