summaryrefslogtreecommitdiff
path: root/cli/js/compiler_api.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-02-25 09:14:27 -0500
committerGitHub <noreply@github.com>2020-02-25 09:14:27 -0500
commit91b606aaae23bcb790b55adc5fe70a182a37d564 (patch)
tree16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/compiler_api.ts
parent805992b14a65a6dbfb857dea6d9b657477de043d (diff)
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/compiler_api.ts')
-rw-r--r--cli/js/compiler_api.ts13
1 files changed, 3 insertions, 10 deletions
diff --git a/cli/js/compiler_api.ts b/cli/js/compiler_api.ts
index d397ca568..33748d2b8 100644
--- a/cli/js/compiler_api.ts
+++ b/cli/js/compiler_api.ts
@@ -4,7 +4,6 @@
// compiler within Deno.
import { DiagnosticItem } from "./diagnostics.ts";
-import * as dispatch from "./dispatch.ts";
import { sendAsync } from "./dispatch_json.ts";
import * as util from "./util.ts";
@@ -296,9 +295,7 @@ export function transpileOnly(
sources,
options: options ? JSON.stringify(options) : undefined
};
- return sendAsync(dispatch.OP_TRANSPILE, payload).then(result =>
- JSON.parse(result)
- );
+ return sendAsync("op_transpile", payload).then(result => JSON.parse(result));
}
/** Takes a root module name, any optionally a record set of sources. Resolves
@@ -344,9 +341,7 @@ export function compile(
sources: !!sources,
options
});
- return sendAsync(dispatch.OP_COMPILE, payload).then(result =>
- JSON.parse(result)
- );
+ return sendAsync("op_compile", payload).then(result => JSON.parse(result));
}
/** Takes a root module name, and optionally a record set of sources. Resolves
@@ -393,7 +388,5 @@ export function bundle(
sources: !!sources,
options
});
- return sendAsync(dispatch.OP_COMPILE, payload).then(result =>
- JSON.parse(result)
- );
+ return sendAsync("op_compile", payload).then(result => JSON.parse(result));
}