refactor: use Symbol.for instead of Symbol in cli/rt/ (#7537)

This commit is contained in:
Bartek Iwańczuk 2020-09-17 18:42:36 +02:00 committed by GitHub
parent bda9379385
commit c307e3e4be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 12 deletions

View file

@ -11,7 +11,8 @@
const { cloneValue, setFunctionName } = window.__bootstrap.webUtil;
const { assert, AssertionError } = window.__bootstrap.util;
const { customInspect, inspect } = window.__bootstrap.console;
const customInspect = Symbol.for("Deno.customInspect");
const sym = {
abortAlgorithm: Symbol("abortAlgorithm"),
@ -636,9 +637,7 @@
}
[customInspect]() {
return `${this.constructor.name} {\n readable: ${
inspect(this.readable)
}\n writable: ${inspect(this.writable)}\n}`;
return this.constructor.name;
}
}