mirror of
https://github.com/denoland/deno.git
synced 2024-12-13 11:02:19 -05:00
22 lines
413 B
TypeScript
22 lines
413 B
TypeScript
|
globalThis.addEventListener("unhandledrejection", (e) => {
|
||
|
console.log("unhandled rejection", e.reason);
|
||
|
e.preventDefault();
|
||
|
});
|
||
|
|
||
|
const dummyImport = (await import("./import.ts")).default;
|
||
|
|
||
|
let a = new Promise((resolve, reject) => {
|
||
|
throw "errA";
|
||
|
});
|
||
|
|
||
|
let i = 0;
|
||
|
while (true) {
|
||
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
||
|
i++;
|
||
|
console.log("running...");
|
||
|
|
||
|
if (i > 3) {
|
||
|
break;
|
||
|
}
|
||
|
}
|