summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-05-11 10:17:07 +0800
committerGitHub <noreply@github.com>2021-05-11 11:17:07 +0900
commitba8d6ec771a7094eb7df3e8f19c91709f9935379 (patch)
treedd8bbc98edba8c9b58615c43b4904d46461e8b30 /cli/dts/lib.deno.ns.d.ts
parent2b8376db2445a6b0643b753a12860ee7db9012a3 (diff)
docs(cli/dts): fix Deno.inspect examples (#10569)
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r--cli/dts/lib.deno.ns.d.ts22
1 files changed, 12 insertions, 10 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
index ebdf8097e..5a7eedfd1 100644
--- a/cli/dts/lib.deno.ns.d.ts
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -2122,11 +2122,12 @@ declare namespace Deno {
* `console.log()`.
*
* ```ts
- * const obj = {};
- * obj.propA = 10;
- * obj.propB = "hello";
- * const objAsString = Deno.inspect(obj); // { propA: 10, propB: "hello" }
- * console.log(obj); // prints same value as objAsString, e.g. { propA: 10, propB: "hello" }
+ * const obj = {
+ * a: 10,
+ * b: "hello",
+ * };
+ * const objAsString = Deno.inspect(obj); // { a: 10, b: "hello" }
+ * 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
@@ -2140,15 +2141,16 @@ declare namespace Deno {
* return "x=" + this.x + ", y=" + this.y;
* }
* }
- * ```
*
- * const inStringFormat = Deno.inspect(new A()); // "x=10, y=hello"
- * console.log(inStringFormat); // prints "x=10, y=hello"
+ * const inStringFormat = Deno.inspect(new A()); // "x=10, y=hello"
+ * console.log(inStringFormat); // prints "x=10, y=hello"
+ * ```
*
* Finally, you can also specify the depth to which it will format.
*
- * Deno.inspect({a: {b: {c: {d: 'hello'}}}}, {depth: 2}); // { a: { b: [Object] } }
- *
+ * ```ts
+ * Deno.inspect({a: {b: {c: {d: 'hello'}}}}, {depth: 2}); // { a: { b: [Object] } }
+ * ```
*/
export function inspect(value: unknown, options?: InspectOptions): string;