mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
feat: stabilize Deno.uid() and Deno.gid() (#16424)
Closes https://github.com/denoland/deno_std/issues/2791
This commit is contained in:
parent
0500aa1f71
commit
c36496b3bb
4 changed files with 30 additions and 38 deletions
28
cli/dts/lib.deno.ns.d.ts
vendored
28
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
|
32
cli/dts/lib.deno.unstable.d.ts
vendored
32
cli/dts/lib.deno.unstable.d.ts
vendored
|
@ -269,38 +269,6 @@ declare namespace Deno {
|
|||
*/
|
||||
export function umask(mask?: number): number;
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Returns the user id of the Deno 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;
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* 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;
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* All plain number types for interfacing with foreign functions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue