this
JS-010535 return this._apiUrl;
36 }
37
38 private async _retry<RESPONSE>(fn: Observable<RESPONSE>, options?: IApiRequestOptions): Promise<ApiResponse<RESPONSE>> {39 const maxRetries = options?.retries || 3;
40 let lastError: HttpErrorResponse = new HttpErrorResponse({ status: 0 });
41 for (let i = 0; i < maxRetries; i++) {
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();