QuantumQ
Deno2y ago
Quantum

Hoping for a clean way to get an array of filenames in directory

Trying to do something like this:
const files = Deno.readDirSync(Deno.cwd()).map(x => x.name);

But I get this:
Property 'map' does not exist on type 'Iterable<DirEntry>'.


Is a for loop the only way?
Was this page helpful?