Files
codeql/javascript/ql/test/ApiGraphs/async-await/tst.ts
Max Schaefer bc91f664ac JavaScript: Teach API graphs to handle some forms of property copying.
In particular, copied promises are now handled better.
2021-10-29 11:19:54 +01:00

10 lines
308 B
TypeScript

import { readFile } from 'fs/promises';
async function readFileUtf8(path: string): Promise<string> {
return readFile(path, { encoding: 'utf8' });
}
async function test(path: string) {
await readFileUtf8(path); /* use (promised (return (member readFile (member exports (module fs/promises))))) */
}