From c43cfedeba5d6ac96e1b1febed8549e750606e3f Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 26 Mar 2019 23:22:07 +1100 Subject: namespace reorg: libdeno and DenoCore to Deno.core (#1998) --- js/repl.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/repl.ts') diff --git a/js/repl.ts b/js/repl.ts index c39a79a7d..068501873 100644 --- a/js/repl.ts +++ b/js/repl.ts @@ -6,7 +6,7 @@ import { close } from "./files"; import * as dispatch from "./dispatch"; import { exit } from "./os"; import { window } from "./window"; -import { libdeno } from "./libdeno"; +import { core } from "./core"; import { formatError } from "./format_error"; const helpMsg = [ @@ -90,7 +90,7 @@ function isRecoverableError(e: Error): boolean { // Returns true if code is consumed (no error/irrecoverable error). // Returns false if error is recoverable function evaluate(code: string): boolean { - const [result, errInfo] = libdeno.evalContext(code); + const [result, errInfo] = core.evalContext(code); if (!errInfo) { console.log(result); } else if (errInfo.isCompileError && isRecoverableError(errInfo.thrown)) { @@ -99,7 +99,7 @@ function evaluate(code: string): boolean { } else { if (errInfo.isNativeError) { const formattedError = formatError( - libdeno.errorToJSON(errInfo.thrown as Error) + core.errorToJSON(errInfo.thrown as Error) ); console.error(formattedError); } else { @@ -140,7 +140,7 @@ export async function replLoop(): Promise { if (err.message !== "Interrupted") { // e.g. this happens when we have deno.close(3). // We want to display the problem. - const formattedError = formatError(libdeno.errorToJSON(err)); + const formattedError = formatError(core.errorToJSON(err)); console.error(formattedError); } // Quit REPL anyways. @@ -162,7 +162,7 @@ export async function replLoop(): Promise { } else { // e.g. this happens when we have deno.close(3). // We want to display the problem. - const formattedError = formatError(libdeno.errorToJSON(err)); + const formattedError = formatError(core.errorToJSON(err)); console.error(formattedError); quitRepl(1); } -- cgit v1.2.3