From 63293a90e1503aa9c18ce5f89ebc6d5c066f09bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 22 Jan 2020 23:58:13 +0100 Subject: refactor: snapshotting (#3753) --- cli/js/compiler_host.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cli/js/compiler_host.ts') diff --git a/cli/js/compiler_host.ts b/cli/js/compiler_host.ts index 3e6df4485..bff16757b 100644 --- a/cli/js/compiler_host.ts +++ b/cli/js/compiler_host.ts @@ -1,10 +1,8 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { MediaType, SourceFile } from "./compiler_sourcefile.ts"; -import { OUT_DIR, WriteFileCallback } from "./compiler_util.ts"; +import { OUT_DIR, WriteFileCallback, getAsset } from "./compiler_util.ts"; import { cwd } from "./dir.ts"; -import { sendSync } from "./dispatch_json.ts"; -import * as dispatch from "./dispatch.ts"; import { assert, notImplemented } from "./util.ts"; import * as util from "./util.ts"; @@ -135,7 +133,7 @@ export class Host implements ts.CompilerHost { return sourceFile; } const name = url.includes(".") ? url : `${url}.d.ts`; - const sourceCode = sendSync(dispatch.OP_FETCH_ASSET, { name }); + const sourceCode = getAsset(name); return new SourceFile({ url, filename, -- cgit v1.2.3