From f36bb7a04eabe0330cb166bf9ce5021c92f38dc8 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 6 Apr 2020 21:15:41 +0530 Subject: linter --- src/util/amounts.ts | 2 +- src/util/query.ts | 6 +++--- src/util/time.ts | 2 +- src/util/timer.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/util') diff --git a/src/util/amounts.ts b/src/util/amounts.ts index f9946393f..f0a4f1d72 100644 --- a/src/util/amounts.ts +++ b/src/util/amounts.ts @@ -260,7 +260,7 @@ export function parse(s: string): AmountJson | undefined { if (tail.length > fractionalLength + 1) { return undefined; } - let value = Number.parseInt(res[2]); + const value = Number.parseInt(res[2]); if (value > maxAmountValue) { return undefined; } diff --git a/src/util/query.ts b/src/util/query.ts index ce704b4fc..44f668658 100644 --- a/src/util/query.ts +++ b/src/util/query.ts @@ -123,8 +123,8 @@ interface CursorValueResult { class ResultStream { private currentPromise: Promise; - private gotCursorEnd: boolean = false; - private awaitingResult: boolean = false; + private gotCursorEnd = false; + private awaitingResult = false; constructor(private req: IDBRequest) { this.awaitingResult = true; @@ -304,7 +304,7 @@ function runWithTransaction( const storeName = stores.map((x) => x.name); const tx = db.transaction(storeName, mode); let funResult: any = undefined; - let gotFunResult: boolean = false; + let gotFunResult = false; tx.oncomplete = () => { // This is a fatal error: The transaction completed *before* // the transaction function returned. Likely, the transaction diff --git a/src/util/time.ts b/src/util/time.ts index 138ecb876..05188b6d2 100644 --- a/src/util/time.ts +++ b/src/util/time.ts @@ -34,7 +34,7 @@ export interface Duration { readonly d_ms: number | "forever"; } -let timeshift: number = 0; +let timeshift = 0; export function setDangerousTimetravel(dt: number) { timeshift = dt; diff --git a/src/util/timer.ts b/src/util/timer.ts index 8706c939e..a1712b03f 100644 --- a/src/util/timer.ts +++ b/src/util/timer.ts @@ -87,7 +87,7 @@ const nullTimerHandle = { * Group of timers that can be destroyed at once. */ export class TimerGroup { - private stopped: boolean = false; + private stopped = false; private timerMap: { [index: number]: TimerHandle } = {}; -- cgit v1.2.3