From 2b53602d3c798b68db4ce986546d3434b986096a Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Fri, 6 Aug 2021 20:21:29 +0300 Subject: feat: support AbortSignal in writeFile (#11568) --- cli/dts/lib.deno.ns.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli/dts/lib.deno.ns.d.ts') diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index b0c56591b..8aa478f12 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -1714,6 +1714,12 @@ declare namespace Deno { create?: boolean; /** Permissions always applied to file. */ mode?: number; + /** + * An abort signal to allow cancellation of the file write operation. + * If the signal becomes aborted the writeFile operation will be stopped + * and the promise returned will be rejected with an AbortError. + */ + signal?: AbortSignal; } /** Synchronously write `data` to the given `path`, by default creating a new -- cgit v1.2.3