diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-05-29 13:02:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-29 14:02:36 +0200 |
commit | 49c70774012e929b3c77b808edc5a7908bcb6fa2 (patch) | |
tree | 40bc92223baab70b46bdf4f7a2f5d5edf7592308 /cli/js/lib.deno.shared_globals.d.ts | |
parent | ce246d8d85283af16250dcb5970eca6caf9cca6d (diff) |
fix(cli/js/error_stack): Expose Error.captureStackTrace (#5254)
Diffstat (limited to 'cli/js/lib.deno.shared_globals.d.ts')
-rw-r--r-- | cli/js/lib.deno.shared_globals.d.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/js/lib.deno.shared_globals.d.ts b/cli/js/lib.deno.shared_globals.d.ts index f3a565668..2ad39545b 100644 --- a/cli/js/lib.deno.shared_globals.d.ts +++ b/cli/js/lib.deno.shared_globals.d.ts @@ -1481,3 +1481,11 @@ declare const AbortSignal: { prototype: AbortSignal; new (): AbortSignal; }; + +interface ErrorConstructor { + /** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */ + // eslint-disable-next-line @typescript-eslint/ban-types + captureStackTrace(error: Object, constructor?: Function): void; + // TODO(nayeemrmn): Support `Error.prepareStackTrace()`. We currently use this + // internally in a way that makes it unavailable for users. +} |