Skip to content

Commit 9f363c0

Browse files
authored
docs: remove quotes around undefined in Deno.env.get example (#29159)
`Deno.env.get` returns undefined when the environment variable is not present. I initially interpreted this doc string to indicate that it would return the string literal `"undefined"`, which isn't right. Could use backticks here as above, but a little confusing in a JS context where this also indicates a (template) string literal.
1 parent 9102d4f commit 9f363c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/tsc/dts/lib.deno.ns.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ declare namespace Deno {
15101510
*
15111511
* ```ts
15121512
* console.log(Deno.env.get("HOME")); // e.g. outputs "/home/alice"
1513-
* console.log(Deno.env.get("MADE_UP_VAR")); // outputs "undefined"
1513+
* console.log(Deno.env.get("MADE_UP_VAR")); // outputs undefined
15141514
* ```
15151515
*
15161516
* Requires `allow-env` permission.

0 commit comments

Comments
 (0)