1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00

remove console constructor (#1985)

This commit is contained in:
迷渡 2019-03-22 23:35:49 +08:00 committed by Ryan Dahl
parent 12753e492f
commit efe9c18b45

View file

@ -4,9 +4,7 @@ import { assert, assertEquals, test } from "./test_util.ts";
// Some of these APIs aren't exposed in the types and so we have to cast to any
// in order to "trick" TypeScript.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { Console, libdeno, stringifyArgs, inspect, write, stdout } = Deno as any;
const console = new Console(libdeno.print);
const { Console, stringifyArgs, inspect, write, stdout } = Deno as any;
function stringify(...args: unknown[]): string {
return stringifyArgs(args).replace(/\n$/, "");