mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 21:24:48 +00:00
refactor: use Symbol.for instead of Symbol in cli/rt/ (#7537)
This commit is contained in:
parent
bda9379385
commit
c307e3e4be
6 changed files with 22 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue