aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/amounts.ts2
-rw-r--r--src/util/query.ts6
-rw-r--r--src/util/time.ts2
-rw-r--r--src/util/timer.ts2
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 } = {};