From 6c4da0e429eb47dae6a220c5576a39f137615bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 16 Sep 2020 22:22:43 +0200 Subject: refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521) Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync --- cli/rt/40_fs_events.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/rt/40_fs_events.js') diff --git a/cli/rt/40_fs_events.js b/cli/rt/40_fs_events.js index b9121c155..43c0a4b92 100644 --- a/cli/rt/40_fs_events.js +++ b/cli/rt/40_fs_events.js @@ -1,7 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. ((window) => { - const { sendSync, sendAsync } = window.__bootstrap.dispatchJson; + const core = window.Deno.core; const { errors } = window.__bootstrap.errors; const { close } = window.__bootstrap.resources; @@ -10,7 +10,7 @@ constructor(paths, options) { const { recursive } = options; - this.#rid = sendSync("op_fs_events_open", { recursive, paths }); + this.#rid = core.jsonOpSync("op_fs_events_open", { recursive, paths }); } get rid() { @@ -19,7 +19,7 @@ async next() { try { - return await sendAsync("op_fs_events_poll", { + return await core.jsonOpAsync("op_fs_events_poll", { rid: this.rid, }); } catch (error) { -- cgit v1.2.3