Open this example in the interactive library
Source code
const entries: readonly (readonly [string, number])[] = [
["api", 2],
["web", 4],
];
console.log(
((m: ReadonlyMap<string, number>) => [...m.keys()])(new Map(entries)),
);
Sample output
[ 'api', 'web' ]
