diff options
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/tests/unit/error_test.ts | 1 | ||||
| -rw-r--r-- | cli/tsc/dts/lib.deno.ns.d.ts | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/cli/tests/unit/error_test.ts b/cli/tests/unit/error_test.ts index bb7a9baf8..6fdf4f762 100644 --- a/cli/tests/unit/error_test.ts +++ b/cli/tests/unit/error_test.ts @@ -15,6 +15,7 @@ Deno.test("Errors work", () => { assert(new Deno.errors.InvalidData("msg") instanceof Error); assert(new Deno.errors.TimedOut("msg") instanceof Error); assert(new Deno.errors.Interrupted("msg") instanceof Error); + assert(new Deno.errors.WouldBlock("msg") instanceof Error); assert(new Deno.errors.WriteZero("msg") instanceof Error); assert(new Deno.errors.UnexpectedEof("msg") instanceof Error); assert(new Deno.errors.BadResource("msg") instanceof Error); diff --git a/cli/tsc/dts/lib.deno.ns.d.ts b/cli/tsc/dts/lib.deno.ns.d.ts index 33a568b65..d81e4afcd 100644 --- a/cli/tsc/dts/lib.deno.ns.d.ts +++ b/cli/tsc/dts/lib.deno.ns.d.ts @@ -220,6 +220,12 @@ declare namespace Deno { * @category Errors */ export class Interrupted extends Error {} /** + * Raised when the underlying operating system would need to block to + * complete but an asynchronous (non-blocking) API is used. + * + * @category Errors */ + export class WouldBlock extends Error {} + /** * Raised when expecting to write to a IO buffer resulted in zero bytes * being written. * @@ -4377,7 +4383,7 @@ declare namespace Deno { * const status = await Deno.permissions.query({ name: "read", path: "/etc" }); * console.log(status.state); * ``` - * + * * ```ts * const status = Deno.permissions.querySync({ name: "read", path: "/etc" }); * console.log(status.state); @@ -4391,7 +4397,7 @@ declare namespace Deno { * const status = await Deno.permissions.revoke({ name: "run" }); * assert(status.state !== "granted") * ``` - * + * * ```ts * import { assert } from "https://deno.land/std/testing/asserts.ts"; * @@ -4409,7 +4415,7 @@ declare namespace Deno { * console.log("'env' permission is denied."); * } * ``` - * + * * ```ts * const status = Deno.permissions.requestSync({ name: "env" }); * if (status.state === "granted") { |
