From c8309078ee5babac05a42aec6f4d2683ecf65447 Mon Sep 17 00:00:00 2001 From: Hexagon Date: Tue, 2 Jul 2024 21:52:22 +0200 Subject: [PATCH] Lint fix --- src/cli/loop.ts | 4 ++-- test/kv.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/loop.ts b/src/cli/loop.ts index c0ffcbc..4cf2159 100644 --- a/src/cli/loop.ts +++ b/src/cli/loop.ts @@ -18,7 +18,7 @@ export async function main() { let exit = false; while (!exit) { // Collect user input - let command; + let command: string | null; if (CurrentRuntime === Runtime.Node) { const rl = createInterface({ // @ts-ignore Cross-runtime @@ -27,7 +27,7 @@ export async function main() { output: process.stdout, }); command = await new Promise((resolve) => { - rl.question(Colors.blue("> "), (cmd: unknown) => { + rl.question(Colors.blue("> "), (cmd: string) => { rl.close(); resolve(cmd); }); diff --git a/test/kv.test.ts b/test/kv.test.ts index dda726f..70a81e5 100644 --- a/test/kv.test.ts +++ b/test/kv.test.ts @@ -402,7 +402,7 @@ test("KV: sync event triggers and reflects data changes", async () => { await kvStore1.set(["user", "age"], 42); // Wait for the watchdog interval to ensure a sync occurs - await new Promise((resolve) => setTimeout(resolve, SYNC_INTERVAL_MS * 2)); // Autosync should have happened within 2 sec + await new Promise((resolve) => setTimeout(resolve, SYNC_INTERVAL_MS * 1.8)); // Autosync should have happened within 1.8 times the sync interval // Assert that the second instance has the updated data assertEquals(syncedData.length, 2);