Below is a small TypeScript script with a Promise cache. It makes several calls to the same function, and the data source always finishes the request in a microtask. You need to determine the exact output in stdout.
async function runs before the first await;Promise is stored in the cache;.then(...) handlers on the same Promise are executed.tsc -p .
node dist/main.js
5.8.322.xES modulesstrict: truetsc -p . into the dist directorynode dist/main.jsClick a line and write what it prints. Explanation is optional.