Skip to content

Commit

Permalink
Add deno.window lib reference to extension_api.ts (#890)
Browse files Browse the repository at this point in the history
When adding the reference to deno_core in b1f1c81, I did not think about
[this line in deno_core] which prevents loading the default libs... This
flaw extends to any users of our extension_api.ts and causes issues when
accessing basic things like `Deno.exit` or `Deno.args`.

To counteract that, this patch adds a lib reference to `deno.window`,
which is the default library that is used for Phylum extensions.

[this line in deno_core]: https://github.com/denoland/deno/blob/98bbf87742969802b392130c536454aa61a20395/core/lib.deno_core.d.ts#L5
  • Loading branch information
kylewillmon authored Dec 30, 2022
1 parent 64aca4d commit a4d53ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cli/src/extension_api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// deno-lint-ignore-file ban-types

/// <reference types="https://raw.githubusercontent.com/denoland/deno/v1.28.3/core/lib.deno_core.d.ts" />
/// <reference lib="deno.window" />

export class PhylumApi {
/**
Expand Down

0 comments on commit a4d53ec

Please sign in to comment.