Enable @typescript-eslint/explicit-member-accessibility on /src (#9785)

* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier
This commit is contained in:
Michael Telatynski 2022-12-16 12:29:59 +00:00 committed by GitHub
parent 51554399fb
commit f1e8e7f140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
396 changed files with 1110 additions and 1098 deletions

View file

@ -32,7 +32,7 @@ export default class Timer {
private resolve: () => void;
private reject: (Error) => void;
constructor(private timeout: number) {
public constructor(private timeout: number) {
this.setNotStarted();
}
@ -59,7 +59,7 @@ export default class Timer {
}
};
changeTimeout(timeout: number) {
public changeTimeout(timeout: number) {
if (timeout === this.timeout) {
return;
}
@ -75,7 +75,7 @@ export default class Timer {
* if not started before, starts the timer.
* @returns {Timer} the same timer
*/
start() {
public start() {
if (!this.isRunning()) {
this.startTs = Date.now();
this.timerHandle = window.setTimeout(this.onTimeout, this.timeout);
@ -87,7 +87,7 @@ export default class Timer {
* (re)start the timer. If it's running, reset the timeout. If not, start it.
* @returns {Timer} the same timer
*/
restart() {
public restart() {
if (this.isRunning()) {
// don't clearTimeout here as this method
// can be called in fast succession,
@ -105,7 +105,7 @@ export default class Timer {
* and reject the promise for this timer.
* @returns {Timer} the same timer
*/
abort() {
public abort() {
if (this.isRunning()) {
clearTimeout(this.timerHandle);
this.reject(new Error("Timer was aborted."));
@ -119,11 +119,11 @@ export default class Timer {
*or is rejected when abort is called
*@return {Promise}
*/
finished() {
public finished() {
return this.promise;
}
isRunning() {
public isRunning() {
return this.timerHandle !== null;
}
}