diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-04-25 15:53:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 10:53:26 -0400 |
commit | b33685e94bb8edbbaabd67a01bff429bf4e49168 (patch) | |
tree | 13a14746043442ff2fa8a66e4523943d0a025b9a | |
parent | 0c47cd67850e4c195212c8edfcb3a62b8435ed3a (diff) |
fix(cli/js/symbols): Update symbol descriptions (#4878)
Don't use Symbol.for() to define Deno.symbols.customInspect.
-rw-r--r-- | cli/js/internals.ts | 2 | ||||
-rw-r--r-- | cli/js/tests/console_test.ts | 2 | ||||
-rw-r--r-- | cli/js/web/console.ts | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cli/js/internals.ts b/cli/js/internals.ts index 174e9a0d4..a675c5d7f 100644 --- a/cli/js/internals.ts +++ b/cli/js/internals.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -export const internalSymbol = Symbol("Deno.internal"); +export const internalSymbol = Symbol("Deno.symbols.internal"); // The object where all the internal fields for testing will be living. // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/cli/js/tests/console_test.ts b/cli/js/tests/console_test.ts index 88902f84b..43378e2ca 100644 --- a/cli/js/tests/console_test.ts +++ b/cli/js/tests/console_test.ts @@ -631,7 +631,7 @@ unitTest(function consoleTestWithCustomInspectorError(): void { assertEquals(stringify(new B({ a: "a" })), "a"); assertEquals( stringify(B.prototype), - "{ Symbol(Deno.customInspect): [Function: [Deno.customInspect]] }" + "{ Symbol(Deno.symbols.customInspect): [Function: [Deno.symbols.customInspect]] }" ); }); diff --git a/cli/js/web/console.ts b/cli/js/web/console.ts index 7f320398c..061147887 100644 --- a/cli/js/web/console.ts +++ b/cli/js/web/console.ts @@ -954,7 +954,7 @@ export class Console { } } -export const customInspect = Symbol.for("Deno.customInspect"); +export const customInspect = Symbol("Deno.symbols.customInspect"); export function inspect( value: unknown, |