mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
fix: add prefer-readonly rule (#5122)
This commit is contained in:
@@ -54,7 +54,7 @@ export class TraceReporter {
|
||||
|
||||
private spansCache = new Array<TraceSpan>();
|
||||
private reportIntervalId: number | undefined | NodeJS.Timeout;
|
||||
private reportInterval = 60_000;
|
||||
private readonly reportInterval = 60_000;
|
||||
|
||||
private static instance: TraceReporter;
|
||||
|
||||
@@ -175,7 +175,7 @@ export class TraceReporter {
|
||||
};
|
||||
}
|
||||
|
||||
private initTraceReport = () => {
|
||||
private readonly initTraceReport = () => {
|
||||
if (!this.reportIntervalId && TraceReporter.shouldReportTrace) {
|
||||
if (typeof window !== 'undefined') {
|
||||
this.reportIntervalId = window.setInterval(
|
||||
@@ -191,7 +191,7 @@ export class TraceReporter {
|
||||
}
|
||||
};
|
||||
|
||||
private reportHandler = () => {
|
||||
private readonly reportHandler = () => {
|
||||
if (this.spansCache.length <= 0) {
|
||||
clearInterval(this.reportIntervalId);
|
||||
this.reportIntervalId = undefined;
|
||||
|
||||
Reference in New Issue
Block a user