1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 16:19:12 -05:00
denoland-deno/cli/tests/012_async.ts
Kitson Kelly 9837d324a7 Update to TypeScript 3.7 (#3275)
and update to prettier 1.19

Also, update `assert()` and remove not null assertions where possibly
in `cli`.

Closes #3273
2019-11-13 13:42:34 -05:00

11 lines
231 B
TypeScript

// Check that we can use the async keyword.
async function main(): Promise<void> {
await new Promise((resolve): void => {
console.log("2");
setTimeout(resolve, 100);
});
console.log("3");
}
console.log("1");
main();