offload/__test__/echo-1s.worker.ts

8 lines
175 B
TypeScript
Raw Normal View History

2024-10-25 21:19:39 +00:00
import { handler } from "../mod.ts";
declare var self: Worker;
handler(async (data: any) => {
await new Promise((resolve) => setTimeout(resolve, 1000));
return data;
});