diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-04-06 21:15:41 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-04-06 21:15:41 +0530 |
commit | f36bb7a04eabe0330cb166bf9ce5021c92f38dc8 (patch) | |
tree | 9a242a06bd5353c8b167600c31776c9f16d9d21c /src/util | |
parent | 07f25566ca51b7faf6462a57d15f4ebbfc733ab0 (diff) |
linter
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/amounts.ts | 2 | ||||
-rw-r--r-- | src/util/query.ts | 6 | ||||
-rw-r--r-- | src/util/time.ts | 2 | ||||
-rw-r--r-- | src/util/timer.ts | 2 |
4 files changed, 6 insertions, 6 deletions
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<T> { class ResultStream<T> { private currentPromise: Promise<void>; - 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<T>( 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 } = {}; |