From 6bea3c135f9ee9946cab4b1e1c6c7c2a4f74087d Mon Sep 17 00:00:00 2001 From: Jixun Wu 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); +};