mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
feat: Return null on error in Deno.dir() (#3531)
This commit is contained in:
parent
e8d82a6348
commit
b7b0668c78
3 changed files with 16 additions and 9 deletions
4
cli/js/lib.deno_runtime.d.ts
vendored
4
cli/js/lib.deno_runtime.d.ts
vendored
|
@ -74,6 +74,8 @@ declare namespace Deno {
|
|||
/**
|
||||
* Returns the user and platform specific directories.
|
||||
* Requires the `--allow-env` flag.
|
||||
* Returns null if there is no applicable directory or if any other error
|
||||
* occurs.
|
||||
*
|
||||
* Argument values: "home", "cache", "config", "data", "data_local", "audio",
|
||||
* "desktop", "document", "download", "font", "picture", "public", "template",
|
||||
|
@ -170,7 +172,7 @@ declare namespace Deno {
|
|||
* | macOS | `$HOME`/Movies | /Users/Alice/Movies |
|
||||
* | Windows | `{FOLDERID_Videos}` | C:\Users\Alice\Videos |
|
||||
*/
|
||||
export function dir(kind: DirKind): string;
|
||||
export function dir(kind: DirKind): string | null;
|
||||
|
||||
/**
|
||||
* Returns the path to the current deno executable.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue