Enable @typescript-eslint/explicit-member-accessibility
on /src (#9785)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier
This commit is contained in:
parent
51554399fb
commit
f1e8e7f140
396 changed files with 1110 additions and 1098 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue