From d0c54777311d2cc30b824f397b7541dca80875fa Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 23 Aug 2022 10:57:01 +1000 Subject: docs: add permission tags to JSDocs (#15541) Co-authored-by: Leo Kettmeir --- ext/fetch/lib.deno_fetch.d.ts | 1 + ext/net/lib.deno_net.d.ts | 7 +++++++ ext/websocket/lib.deno_websocket.d.ts | 1 + 3 files changed, 9 insertions(+) (limited to 'ext') diff --git a/ext/fetch/lib.deno_fetch.d.ts b/ext/fetch/lib.deno_fetch.d.ts index b4db4385d..429a6d1b0 100644 --- a/ext/fetch/lib.deno_fetch.d.ts +++ b/ext/fetch/lib.deno_fetch.d.ts @@ -464,6 +464,7 @@ declare class Response implements Body { * const jsonData = await response.json(); * ``` * + * @tags allow-net, allow-read * @category Fetch API */ declare function fetch( diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index 25eb893d1..d6c7d4afd 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -102,6 +102,7 @@ declare namespace Deno { * * Requires `allow-net` permission. * + * @tags allow-net * @category Network */ export function listen( @@ -117,11 +118,13 @@ declare namespace Deno { /** Path to a file containing a PEM formatted CA certificate. Requires * `--allow-read`. * + * @tags allow-read * @deprecated This option is deprecated and will be removed in Deno 2.0. */ certFile?: string; /** Server private key file. Requires `--allow-read`. * + * @tags allow-read * @deprecated This option is deprecated and will be removed in Deno 2.0. */ keyFile?: string; @@ -138,6 +141,7 @@ declare namespace Deno { * * Requires `allow-net` permission. * + * @tags allow-net * @category Network */ export function listenTls(options: ListenTlsOptions): TlsListener; @@ -165,6 +169,7 @@ declare namespace Deno { * * Requires `allow-net` permission for "tcp". * + * @tags allow-net * @category Network */ export function connect(options: ConnectOptions): Promise; @@ -225,6 +230,7 @@ declare namespace Deno { * * Requires `allow-net` permission. * + * @tags allow-net * @category Network */ export function connectTls(options: ConnectTlsOptions): Promise; @@ -255,6 +261,7 @@ declare namespace Deno { * * Requires `allow-net` permission. * + * @tags allow-net * @category Network */ export function startTls( diff --git a/ext/websocket/lib.deno_websocket.d.ts b/ext/websocket/lib.deno_websocket.d.ts index 537eabf21..bf1410220 100644 --- a/ext/websocket/lib.deno_websocket.d.ts +++ b/ext/websocket/lib.deno_websocket.d.ts @@ -44,6 +44,7 @@ interface WebSocketEventMap { * If you are looking to create a WebSocket server, please take a look at * `Deno.upgradeWebSocket()`. * + * @tags allow-net * @category Web Sockets */ declare class WebSocket extends EventTarget { -- cgit v1.2.3