From 5e09de5991fca9a48a52523e74fcdf4d40fbf98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Mon, 8 May 2023 16:23:46 +0100 Subject: [PATCH] feat: begin building worker --- src/decrypt-worker/client.ts | 1 + src/decrypt-worker/worker.ts | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 src/decrypt-worker/client.ts create mode 100644 src/decrypt-worker/worker.ts diff --git a/src/decrypt-worker/client.ts b/src/decrypt-worker/client.ts new file mode 100644 index 0000000..f966b7b --- /dev/null +++ b/src/decrypt-worker/client.ts @@ -0,0 +1 @@ +export const workerClient = new Worker(new URL('./worker', import.meta.url), { type: 'module' }); diff --git a/src/decrypt-worker/worker.ts b/src/decrypt-worker/worker.ts new file mode 100644 index 0000000..3304a7a --- /dev/null +++ b/src/decrypt-worker/worker.ts @@ -0,0 +1,3 @@ +onmessage = (e) => { + console.log(e.data); +};