summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-04-25 22:02:15 +0200
committerGitHub <noreply@github.com>2020-04-25 22:02:15 +0200
commit62150dd32860a1eb9e7b7ab87f97f8b9cb9a1334 (patch)
tree4299255dd5cecbf9f8b48c9d9ba6ae43569f36d3 /cli/js/lib.deno.ns.d.ts
parentb33685e94bb8edbbaabd67a01bff429bf4e49168 (diff)
BREAKING CHANGE: change return type of Deno.resources() (#4893)
Diffstat (limited to 'cli/js/lib.deno.ns.d.ts')
-rw-r--r--cli/js/lib.deno.ns.d.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts
index 4964f1b01..387ea8326 100644
--- a/cli/js/lib.deno.ns.d.ts
+++ b/cli/js/lib.deno.ns.d.ts
@@ -2139,19 +2139,20 @@ declare namespace Deno {
*/
export function metrics(): Metrics;
- /** **UNSTABLE**: reconsider representation. */
interface ResourceMap {
- [rid: number]: string;
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [rid: number]: any;
}
- /** **UNSTABLE**: The return type is under consideration and may change.
+ /** Returns a map of open resource ids (rid) along with their string
+ * representations. This is an internal API and as such resource
+ * representation has `any` type; that means it can change any time.
*
- * Returns a map of open _file like_ resource ids (rid) along with their string
- * representations.
- *
- * console.log(Deno.resources()); // e.g. { 0: "stdin", 1: "stdout", 2: "stderr" }
+ * console.log(Deno.resources());
+ * // { 0: "stdin", 1: "stdout", 2: "stderr" }
* Deno.openSync('../test.file');
- * console.log(Deno.resources()); // e.g. { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" }
+ * console.log(Deno.resources());
+ * // { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" }
*/
export function resources(): ResourceMap;