From 4430778df3e63936848308515f99e48f2d5694d5 Mon Sep 17 00:00:00 2001 From: Aleksei Ivanov Date: Sun, 28 Dec 2025 06:21:01 +0300 Subject: [PATCH 1/2] docs: clarify getRemainingTime description Clarified the description of the getRemainingTime function to specify that it returns the remaining time in milliseconds. --- docs/content/docs/api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/docs/api.md b/docs/content/docs/api.md index 9f341c7..8e887a0 100644 --- a/docs/content/docs/api.md +++ b/docs/content/docs/api.md @@ -131,12 +131,13 @@ Argument is optional and defaults to the lock expiration time. ### `getRemainingTime` -Get the remaining time before the lock expires. +Get the remaining time in milliseconds before the lock expires. ```ts const lock = verrou.createLock('key', '10s') await lock.acquire() +// returns remaining time for the lock in milliseconds const remainingTime = lock.getRemainingTime() ``` From 26bfbcbfd60b490c9d72b82540bfd6fa074377d1 Mon Sep 17 00:00:00 2001 From: Aleksei Ivanov Date: Sun, 28 Dec 2025 06:22:23 +0300 Subject: [PATCH 2/2] docs: clarify getRemainingTime method description --- packages/verrou/src/lock.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/verrou/src/lock.ts b/packages/verrou/src/lock.ts index 9bba677..62fdcc1 100644 --- a/packages/verrou/src/lock.ts +++ b/packages/verrou/src/lock.ts @@ -174,7 +174,7 @@ export class Lock { } /** - * Get the remaining time before the lock expires + * Get the remaining time in milliseconds before the lock expires */ getRemainingTime() { if (this.#expirationTime === null) return null