summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.ns.d.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-05-04 14:23:06 -0400
committerGitHub <noreply@github.com>2020-05-04 14:23:06 -0400
commit6c02b061ce157b9fc3d20f9bcace0bc6638290d3 (patch)
tree811310674a76ee8ce5761cec3ee711012e542fcf /cli/js/lib.deno.ns.d.ts
parent191c59a5912121fb9062aff6a08b1cc110674044 (diff)
stabilize Deno.cwd and require --allow-read (#5068)
Diffstat (limited to 'cli/js/lib.deno.ns.d.ts')
-rw-r--r--cli/js/lib.deno.ns.d.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts
index 45730acbc..6adaf26ef 100644
--- a/cli/js/lib.deno.ns.d.ts
+++ b/cli/js/lib.deno.ns.d.ts
@@ -144,6 +144,20 @@ declare namespace Deno {
*/
export function chdir(directory: string): void;
+ /**
+ * Return a string representing the current working directory.
+ *
+ * If the current directory can be reached via multiple paths (due to symbolic
+ * links), `cwd()` may return any one of them.
+ *
+ * const currentWorkingDirectory = Deno.cwd();
+ *
+ * Throws `Deno.errors.NotFound` if directory not available.
+ *
+ * Requires --allow-read
+ */
+ export function cwd(): string;
+
export enum SeekMode {
Start = 0,
Current = 1,