diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2021-06-25 16:19:18 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 16:19:18 +0900 |
commit | d832d2bfd1f0487181f96bdecd7a28968a150fac (patch) | |
tree | b4e40fa8689bf97434470cfce9f303f8ddeacf9a /cli/dts/lib.deno.ns.d.ts | |
parent | 606611708c4351e9f5e0e3b975f9331d95168efb (diff) |
chore(ext/console): deprecate Deno.customInspect (#10035)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index da016db8a..e83858586 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -2193,14 +2193,14 @@ declare namespace Deno { * console.log(obj); // prints same value as objAsString, e.g. { a: 10, b: "hello" } * ``` * - * You can also register custom inspect functions, via the `customInspect` Deno - * symbol on objects, to control and customize the output. + * You can also register custom inspect functions, via the symbol `Symbol.for("Deno.customInspect")`, + * on objects, to control and customize the output. * * ```ts * class A { * x = 10; * y = "hello"; - * [Deno.customInspect](): string { + * [Symbol.for("Deno.customInspect")](): string { * return "x=" + this.x + ", y=" + this.y; * } * } @@ -2388,9 +2388,13 @@ declare namespace Deno { */ export const args: string[]; - /** A symbol which can be used as a key for a custom method which will be + /** + * @deprecated A symbol which can be used as a key for a custom method which will be * called when `Deno.inspect()` is called, or when the object is logged to - * the console. */ + * the console. + * + * This symbol is deprecated since 1.9. Use `Symbol.for("Deno.customInspect")` instead. + */ export const customInspect: unique symbol; /** The URL of the entrypoint module entered from the command-line. */ |