diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-04-25 00:45:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 00:45:55 +0200 |
commit | 4a8d25646aa58e3e59d622e69c41822b40415c46 (patch) | |
tree | e228581912bfc0a4bdb56e3caec2ca3a1c1b9087 /cli/js/lib.deno.ns.d.ts | |
parent | 0cb1bb98cc2de8dfe51b7adbe992666936146c90 (diff) |
BREAKING CHANGE: remove Deno.OpenMode (#4884)
This commit removes Deno.OpenMode along with overloaded variants
of Deno.open() and Deno.openSync() that used OpenMode.
Diffstat (limited to 'cli/js/lib.deno.ns.d.ts')
-rw-r--r-- | cli/js/lib.deno.ns.d.ts | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts index 7145751c7..84e287fca 100644 --- a/cli/js/lib.deno.ns.d.ts +++ b/cli/js/lib.deno.ns.d.ts @@ -653,18 +653,6 @@ declare namespace Deno { */ export function openSync(path: string, options?: OpenOptions): File; - /** Synchronously open a file and return an instance of `Deno.File`. The file - * may be created depending on the mode passed in. It is the callers responsibility - * to close the file when finished with it. - * - * const file = Deno.openSync("/foo/bar.txt", "r"); - * // Do work with file - * Deno.close(file.rid); - * - * Requires `allow-read` and/or `allow-write` permissions depending on openMode. - */ - export function openSync(path: string, openMode?: OpenMode): File; - /** Open a file and resolve to an instance of `Deno.File`. The * file does not need to previously exist if using the `create` or `createNew` * open options. It is the callers responsibility to close the file when finished @@ -678,18 +666,6 @@ declare namespace Deno { */ export function open(path: string, options?: OpenOptions): Promise<File>; - /** Open a file and resolve to an instance of `Deno.File`. The file may be - * created depending on the mode passed in. It is the callers responsibility - * to close the file when finished with it. - * - * const file = await Deno.open("/foo/bar.txt", "w+"); - * // Do work with file - * Deno.close(file.rid); - * - * Requires `allow-read` and/or `allow-write` permissions depending on openMode. - */ - export function open(path: string, openMode?: OpenMode): Promise<File>; - /** Creates a file if none exists or truncates an existing file and returns * an instance of `Deno.File`. * @@ -890,21 +866,6 @@ declare namespace Deno { mode?: number; } - /** A set of string literals which specify how to open a file. - * - * |Value |Description | - * |------|--------------------------------------------------------------------------------------------------| - * |`"r"` |Read-only. Default. Starts at beginning of file. | - * |`"r+"`|Read-write. Start at beginning of file. | - * |`"w"` |Write-only. Opens and truncates existing file or creates new one for writing only. | - * |`"w+"`|Read-write. Opens and truncates existing file or creates new one for writing and reading. | - * |`"a"` |Write-only. Opens existing file or creates new one. Each write appends content to the end of file.| - * |`"a+"`|Read-write. Behaves like `"a"` and allows to read from file. | - * |`"x"` |Write-only. Exclusive create - creates new file only if one doesn't exist already. | - * |`"x+"`|Read-write. Behaves like `x` and allows reading from file. | - */ - export type OpenMode = "r" | "r+" | "w" | "w+" | "a" | "a+" | "x" | "x+"; - /** **UNSTABLE**: new API, yet to be vetted * * Check if a given resource id (`rid`) is a TTY. |