diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-02-25 09:14:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 09:14:27 -0500 |
commit | 91b606aaae23bcb790b55adc5fe70a182a37d564 (patch) | |
tree | 16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/format_error.ts | |
parent | 805992b14a65a6dbfb857dea6d9b657477de043d (diff) |
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/format_error.ts')
-rw-r--r-- | cli/js/format_error.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/format_error.ts b/cli/js/format_error.ts index 63250473b..21c4bcfa8 100644 --- a/cli/js/format_error.ts +++ b/cli/js/format_error.ts @@ -1,11 +1,10 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { DiagnosticItem } from "./diagnostics.ts"; -import * as dispatch from "./dispatch.ts"; import { sendSync } from "./dispatch_json.ts"; // TODO(bartlomieju): move to `repl.ts`? export function formatError(errString: string): string { - const res = sendSync(dispatch.OP_FORMAT_ERROR, { error: errString }); + const res = sendSync("op_format_error", { error: errString }); return res.error; } @@ -14,5 +13,5 @@ export function formatError(errString: string): string { * @param items An array of diagnostic items to format */ export function formatDiagnostics(items: DiagnosticItem[]): string { - return sendSync(dispatch.OP_FORMAT_DIAGNOSTIC, { items }); + return sendSync("op_format_diagnostic", { items }); } |