Under the call site's hood
TypeScript call site
import * as deno from "deno";
async function readFileTest() {
// Read file asynchronously
const data1 = await deno.readFile("test.json");
// Read file synchronously
// Note that we don't need `await` keyword.
const data2 = deno.readFile("test.json");
}function readFileSync(filename: string): Uint8Array {
return res(dispatch.sendSync(...req(filename)));
}
async function readFile(filename: string): Promise<Uint8Array> {
return res(await dispatch.sendAsync(...req(filename)));
}C++ converter
Rust executor
Last updated
Was this helpful?