mirror of
https://github.com/denoland/deno.git
synced 2025-01-09 15:48:16 -05:00
fix(cli/js/symbols): Update symbol descriptions (#4878)
Don't use Symbol.for() to define Deno.symbols.customInspect.
This commit is contained in:
parent
0c47cd6785
commit
b33685e94b
3 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
// 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.
|
// The object where all the internal fields for testing will be living.
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
|
|
@ -631,7 +631,7 @@ unitTest(function consoleTestWithCustomInspectorError(): void {
|
||||||
assertEquals(stringify(new B({ a: "a" })), "a");
|
assertEquals(stringify(new B({ a: "a" })), "a");
|
||||||
assertEquals(
|
assertEquals(
|
||||||
stringify(B.prototype),
|
stringify(B.prototype),
|
||||||
"{ Symbol(Deno.customInspect): [Function: [Deno.customInspect]] }"
|
"{ Symbol(Deno.symbols.customInspect): [Function: [Deno.symbols.customInspect]] }"
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -954,7 +954,7 @@ export class Console {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const customInspect = Symbol.for("Deno.customInspect");
|
export const customInspect = Symbol("Deno.symbols.customInspect");
|
||||||
|
|
||||||
export function inspect(
|
export function inspect(
|
||||||
value: unknown,
|
value: unknown,
|
||||||
|
|
Loading…
Reference in a new issue