summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorLiam Murphy <liampm32@gmail.com>2021-07-27 04:40:24 +1000
committerGitHub <noreply@github.com>2021-07-26 20:40:24 +0200
commit091a26104b9ef7435a1bb36e8fc814196a2cb173 (patch)
treeea8cde280bc42ec770c783f5b2df15dbb6d76b21 /cli/dts/lib.deno.ns.d.ts
parent2e69d2135a945682bc67b058a29b221e55915ffb (diff)
fix(cli/dts): Type `Deno.errors.*` as subclasses of `Error` (#10702)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts77
1 files changed, 56 insertions, 21 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index b5b61cd16..469b8a329 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -66,27 +66,62 @@ declare interface PerformanceMeasureOptions {
declare namespace Deno {
/** A set of error constructors that are raised by Deno APIs. */
- export const errors: {
- NotFound: ErrorConstructor;
- PermissionDenied: ErrorConstructor;
- ConnectionRefused: ErrorConstructor;
- ConnectionReset: ErrorConstructor;
- ConnectionAborted: ErrorConstructor;
- NotConnected: ErrorConstructor;
- AddrInUse: ErrorConstructor;
- AddrNotAvailable: ErrorConstructor;
- BrokenPipe: ErrorConstructor;
- AlreadyExists: ErrorConstructor;
- InvalidData: ErrorConstructor;
- TimedOut: ErrorConstructor;
- Interrupted: ErrorConstructor;
- WriteZero: ErrorConstructor;
- UnexpectedEof: ErrorConstructor;
- BadResource: ErrorConstructor;
- Http: ErrorConstructor;
- Busy: ErrorConstructor;
- NotSupported: ErrorConstructor;
- };
+ export namespace errors {
+ export class NotFound extends Error {
+ name: "NotFound";
+ }
+ export class PermissionDenied extends Error {
+ name: "PermissionDenied";
+ }
+ export class ConnectionRefused extends Error {
+ name: "ConnectionRefused";
+ }
+ export class ConnectionReset extends Error {
+ name: "ConnectionReset";
+ }
+ export class ConnectionAborted extends Error {
+ name: "ConnectionAborted";
+ }
+ export class NotConnected extends Error {
+ name: "NotConnected";
+ }
+ export class AddrInUse extends Error {
+ name: "AddrInUse";
+ }
+ export class AddrNotAvailable extends Error {
+ name: "AddrNotAvailable";
+ }
+ export class BrokenPipe extends Error {
+ name: "BrokenPipe";
+ }
+ export class AlreadyExists extends Error {
+ name: "AlreadyExists";
+ }
+ export class InvalidData extends Error {
+ name: "InvalidData";
+ }
+ export class TimedOut extends Error {
+ name: "TimedOut";
+ }
+ export class Interrupted extends Error {
+ name: "Interrupted";
+ }
+ export class WriteZero extends Error {
+ name: "WriteZero";
+ }
+ export class UnexpectedEof extends Error {
+ name: "UnexpectedEof";
+ }
+ export class BadResource extends Error {
+ name: "BadResource";
+ }
+ export class Http extends Error {
+ name: "Http";
+ }
+ export class Busy extends Error {
+ name: "Busy";
+ }
+ }
/** The current process id of the runtime. */
export const pid: number;