From ed2d5cad8e612ad6caa4770e8b4612425d0abfbd Mon Sep 17 00:00:00 2001 From: eliassjogreen Date: Sat, 18 Apr 2020 19:38:58 +0200 Subject: [PATCH] deno v0.41.0, formatting --- .github/workflows/ci.yml | 8 ++++---- mod.ts | 9 +++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26ad526..f30e73f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,12 @@ on: push name: Test jobs: - testAll: - name: test all + test: + name: test runs-on: ubuntu-latest steps: - uses: actions/checkout@master - uses: denolib/setup-deno@master with: - deno-version: 0.39.0 - - run: deno test -A test.ts + deno-version: 0.41.0 + - run: deno test -A diff --git a/mod.ts b/mod.ts index 9f49017..659f762 100644 --- a/mod.ts +++ b/mod.ts @@ -19,11 +19,6 @@ export function parry( const worker = new Worker("./worker.js", { type: "module" }); - worker.postMessage({ - type: "set", - data: original.toString(), - }); - worker.onmessage = (event) => { const { type, id, data } = event.data; @@ -46,8 +41,8 @@ export function parry( promises[id] = [resolve, reject]; worker.postMessage({ type: "call", - id, data: args, + id, }); id++; @@ -65,6 +60,8 @@ export function parry( }); }; + call.set(original); + return call; }