From f88dc4e197f36842b13843dd88da3d74d67578e5 Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Tue, 26 Nov 2019 00:40:57 -0800 Subject: Add Deno.realpath (#3404) --- cli/js/lib.deno_runtime.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'cli/js/lib.deno_runtime.d.ts') diff --git a/cli/js/lib.deno_runtime.d.ts b/cli/js/lib.deno_runtime.d.ts index 3fdc28a54..fb7767aa6 100644 --- a/cli/js/lib.deno_runtime.d.ts +++ b/cli/js/lib.deno_runtime.d.ts @@ -605,6 +605,21 @@ declare namespace Deno { isSymlink(): boolean; } + // @url js/realpath.d.ts + + /** Returns absolute normalized path with symbolic links resolved + * synchronously. + * + * const realPath = Deno.realpathSync("./some/path"); + */ + export function realpathSync(path: string): string; + + /** Returns absolute normalized path with symbolic links resolved. + * + * const realPath = await Deno.realpath("./some/path"); + */ + export function realpath(path: string): Promise; + // @url js/read_dir.d.ts /** Reads the directory given by path and returns a list of file info -- cgit v1.2.3