summaryrefslogtreecommitdiff
path: root/cli/js/web/console.ts
diff options
context:
space:
mode:
authorStanislav <62983943+stanislavstrelnikov@users.noreply.github.com>2020-07-07 04:45:39 +0300
committerGitHub <noreply@github.com>2020-07-06 21:45:39 -0400
commit158ae0bfe900d2bac3076390c4fe3d2b54d94fe5 (patch)
tree209e4b5682e2a899041767c49428e34329e48084 /cli/js/web/console.ts
parentab4c574f5202f607ceb6068f56b3cc8aed1bbbaf (diff)
clean up code in cli/js (#6611)
Diffstat (limited to 'cli/js/web/console.ts')
-rw-r--r--cli/js/web/console.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/cli/js/web/console.ts b/cli/js/web/console.ts
index f6ea7a0a7..1f96bfe9d 100644
--- a/cli/js/web/console.ts
+++ b/cli/js/web/console.ts
@@ -1,4 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
import { isInvalidDate, isTypedArray, TypedArray } from "./util.ts";
import { cliTable } from "./console_table.ts";
import { exposeForTest } from "../internals.ts";
@@ -381,7 +382,7 @@ function createTypedArrayString(
displayName: `${typedArrayName}(${valueLength})`,
delims: ["[", "]"],
entryHandler: (entry, ctx, level, maxLevel): string => {
- const [_, val] = entry;
+ const val = entry[1];
return stringifyWithQuotes(val, ctx, level + 1, maxLevel);
},
group: true,
@@ -400,7 +401,7 @@ function createSetString(
displayName: "Set",
delims: ["{", "}"],
entryHandler: (entry, ctx, level, maxLevel): string => {
- const [_, val] = entry;
+ const val = entry[1];
return stringifyWithQuotes(val, ctx, level + 1, maxLevel);
},
group: false,
@@ -508,7 +509,7 @@ function createRawObjectString(
}
ctx.add(value);
- let baseString = "";
+ let baseString: string;
let shouldShowDisplayName = false;
let displayName = (value as { [Symbol.toStringTag]: string })[
@@ -724,7 +725,7 @@ const timerMap = new Map<string, number>();
const isConsoleInstance = Symbol("isConsoleInstance");
export class Console {
- #printFunc: PrintFunc;
+ readonly #printFunc: PrintFunc;
indentLevel: number;
[isConsoleInstance] = false;