mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -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;
|
||
|
}
|
||
|
}
|