From c36496b3bb9a25640d209d9ac7b2c201bfdc99fb Mon Sep 17 00:00:00 2001 From: Colin Ihrig Date: Wed, 9 Nov 2022 09:46:50 -0500 Subject: feat: stabilize Deno.uid() and Deno.gid() (#16424) Closes https://github.com/denoland/deno_std/issues/2791 --- cli/dts/lib.deno.ns.d.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'cli/dts/lib.deno.ns.d.ts') diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 43c46754b..623f0d848 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -4950,4 +4950,32 @@ declare namespace Deno { * @category Timers */ export function unrefTimer(id: number): void; + + /** + * Returns the user id of the process on POSIX platforms. Returns null on Windows. + * + * ```ts + * console.log(Deno.uid()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function uid(): number | null; + + /** + * Returns the group id of the process on POSIX platforms. Returns null on windows. + * + * ```ts + * console.log(Deno.gid()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function gid(): number | null; } -- cgit v1.2.3