Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/lib.deno.d.ts>Deno.resources

A JavaScript extension package for building strong and modern applications.
Latest
function Deno.resources
Deprecated
Deprecated

This will be removed in Deno 2.0.

import { Deno } from "https://deno.land/x/ayonli_jsext@v0.9.72/lib.deno.d.ts";
const { resources } = Deno;

Returns a map of open resource IDs (rid) along with their string representations. This is an internal API and as such resource representation has unknown type; that means it can change any time and should not be depended upon.

console.log(Deno.resources());
// { 0: "stdin", 1: "stdout", 2: "stderr" }
Deno.openSync('../test.file');
console.log(Deno.resources());
// { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" }

Returns

ResourceMap