From 49a0db0d2a2a697320ea95bacaca9bc61199c951 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Mon, 31 Jan 2022 14:44:19 +0900 Subject: feat(unstable): add Deno.getUid (#13496) --- cli/dts/lib.deno.unstable.d.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cli/dts') diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index bc87ec02a..b8402cd9b 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -133,6 +133,18 @@ declare namespace Deno { */ export function networkInterfaces(): NetworkInterfaceInfo[]; + /** **Unstable** new API. yet to be vetted. + * + * Returns the user id of the process on POSIX platforms. Returns null on windows. + * + * ```ts + * console.log(Deno.getUid()); + * ``` + * + * Requires `allow-env` permission. + */ + export function getUid(): number | null; + /** All possible types for interfacing with foreign functions */ export type NativeType = | "void" -- cgit v1.2.3