mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 21:54: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
|
@ -2,9 +2,9 @@
|
|||
|
||||
((window) => {
|
||||
const { opNow } = window.__bootstrap.timers;
|
||||
const { customInspect, inspect } = window.__bootstrap.console;
|
||||
const { cloneValue } = window.__bootstrap.webUtil;
|
||||
|
||||
const customInspect = Symbol.for("Deno.customInspect");
|
||||
let performanceEntries = [];
|
||||
|
||||
function findMostRecent(
|
||||
|
@ -130,7 +130,7 @@
|
|||
[customInspect]() {
|
||||
return this.detail
|
||||
? `${this.constructor.name} {\n detail: ${
|
||||
inspect(this.detail, { depth: 3 })
|
||||
JSON.stringify(this.detail, null, 2)
|
||||
},\n name: "${this.name}",\n entryType: "${this.entryType}",\n startTime: ${this.startTime},\n duration: ${this.duration}\n}`
|
||||
: `${this.constructor.name} { detail: ${this.detail}, name: "${this.name}", entryType: "${this.entryType}", startTime: ${this.startTime}, duration: ${this.duration} }`;
|
||||
}
|
||||
|
@ -170,7 +170,7 @@
|
|||
[customInspect]() {
|
||||
return this.detail
|
||||
? `${this.constructor.name} {\n detail: ${
|
||||
inspect(this.detail, { depth: 3 })
|
||||
JSON.stringify(this.detail, null, 2)
|
||||
},\n name: "${this.name}",\n entryType: "${this.entryType}",\n startTime: ${this.startTime},\n duration: ${this.duration}\n}`
|
||||
: `${this.constructor.name} { detail: ${this.detail}, name: "${this.name}", entryType: "${this.entryType}", startTime: ${this.startTime}, duration: ${this.duration} }`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue