summaryrefslogtreecommitdiff
path: root/cli/tsc
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-02-05 10:11:54 +1100
committerGitHub <noreply@github.com>2024-02-05 00:11:54 +0100
commit0f7f98795129f3f6bef51d08da9accca5e9ca9cc (patch)
treecb71c1358b9235a7f5098623750712e3de693277 /cli/tsc
parent07a94984e1e3ca24dcaf114ac5ff82c8c3510894 (diff)
feat(unstable): `Deno.FsFile.lock[Sync]()` and `Deno.FsFile.unlock[Sync]()` (#22235)
Closes #22178.
Diffstat (limited to 'cli/tsc')
-rw-r--r--cli/tsc/dts/lib.deno.ns.d.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts
index 7e9e4277a..8401d2302 100644
--- a/cli/tsc/dts/lib.deno.ns.d.ts
+++ b/cli/tsc/dts/lib.deno.ns.d.ts
@@ -2666,6 +2666,30 @@ declare namespace Deno {
* @category File System
*/
utimeSync(atime: number | Date, mtime: number | Date): void;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Acquire an advisory file-system lock for the file.
+ *
+ * @param [exclusive=false]
+ */
+ lock(exclusive?: boolean): Promise<void>;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Synchronously acquire an advisory file-system lock synchronously for the file.
+ *
+ * @param [exclusive=false]
+ */
+ lockSync(exclusive?: boolean): void;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Release an advisory file-system lock for the file.
+ */
+ unlock(): Promise<void>;
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Synchronously release an advisory file-system lock for the file.
+ */
+ unlockSync(): void;
/** Close the file. Closing a file when you are finished with it is
* important to avoid leaking resources.
*