1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00

Remove @url comments from d.ts files (#4449)

These have no function and are not tested, probably incorrect in many
situations.
This commit is contained in:
Ryan Dahl 2020-03-21 17:58:31 -04:00 committed by GitHub
parent b8a5c29bf8
commit 12ff78ed4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 70 deletions

View file

@ -340,8 +340,6 @@ declare namespace Deno {
*/
export function execPath(): string;
// @url js/dir.d.ts
/**
* **UNSTABLE**: maybe needs permissions.
*
@ -382,8 +380,6 @@ declare namespace Deno {
export const EOF: unique symbol;
export type EOF = typeof EOF;
// @url js/io.d.ts
/** **UNSTABLE**: might remove `"SEEK_"` prefix. Might not use all-caps. */
export enum SeekMode {
SEEK_START = 0,
@ -518,8 +514,6 @@ declare namespace Deno {
*/
export function toAsyncIterator(r: Reader): AsyncIterableIterator<Uint8Array>;
// @url js/files.d.ts
/** Synchronously open a file and return an instance of the `File` object.
*
* const file = Deno.openSync("/foo/bar.txt", { read: true, write: true });
@ -716,8 +710,6 @@ declare namespace Deno {
*/
export type OpenMode = "r" | "r+" | "w" | "w+" | "a" | "a+" | "x" | "x+";
// @url js/tty.d.ts
/** **UNSTABLE**: newly added API
*
* Check if a given resource is TTY. */
@ -728,8 +720,6 @@ declare namespace Deno {
* Set TTY to be under raw mode or not. */
export function setRaw(rid: number, mode: boolean): void;
// @url js/buffer.d.ts
/** A variable-sized buffer of bytes with `read()` and `write()` methods.
*
* Based on [Go Buffer](https://golang.org/pkg/bytes/#Buffer). */
@ -816,8 +806,6 @@ declare namespace Deno {
/** Synchronously write all the content of `arr` to `w`. */
export function writeAllSync(w: SyncWriter, arr: Uint8Array): void;
// @url js/mkdir.d.ts
export interface MkdirOptions {
/** Defaults to `false`. If set to `true`, means that any intermediate
* directories will also be created (as with the shell command `mkdir -p`).
@ -861,8 +849,6 @@ declare namespace Deno {
mode?: number
): Promise<void>;
// @url js/make_temp.d.ts
export interface MakeTempOptions {
/** Directory where the temporary directory should be created (defaults to
* the env variable TMPDIR, or the system's default, usually /tmp). */
@ -941,8 +927,6 @@ declare namespace Deno {
* Requires `allow-write` permission. */
export function makeTempFile(options?: MakeTempOptions): Promise<string>;
// @url js/chmod.d.ts
/** Synchronously changes the permission of a specific file/directory of
* specified path. Ignores the process's umask.
*
@ -983,8 +967,6 @@ declare namespace Deno {
* Requires `allow-write` permission. */
export function chmod(path: string, mode: number): Promise<void>;
// @url js/chown.d.ts
/** Synchronously change owner of a regular file or directory. Linux/Mac OS
* only at the moment.
*
@ -1007,8 +989,6 @@ declare namespace Deno {
*/
export function chown(path: string, uid: number, gid: number): Promise<void>;
// @url js/utime.d.ts
/** **UNSTABLE**: needs investigation into high precision time.
*
* Synchronously changes the access and modification times of a file system
@ -1039,8 +1019,6 @@ declare namespace Deno {
mtime: number | Date
): Promise<void>;
// @url js/remove.d.ts
export interface RemoveOptions {
/** Defaults to `false`. If set to `true`, path will be removed even if
* it's a non-empty directory. */
@ -1065,8 +1043,6 @@ declare namespace Deno {
* Requires `allow-write` permission. */
export function remove(path: string, options?: RemoveOptions): Promise<void>;
// @url js/rename.d.ts
/** Synchronously renames (moves) `oldpath` to `newpath`. If `newpath` already
* exists and is not a directory, `renameSync()` replaces it. OS-specific
* restrictions may apply when `oldpath` and `newpath` are in different
@ -1086,8 +1062,6 @@ declare namespace Deno {
* Requires `allow-read` and `allow-write`. */
export function rename(oldpath: string, newpath: string): Promise<void>;
// @url js/read_file.d.ts
/** Reads and returns the entire contents of a file.
*
* const decoder = new TextDecoder("utf-8");
@ -1106,8 +1080,6 @@ declare namespace Deno {
* Requires `allow-read` permission. */
export function readFile(path: string): Promise<Uint8Array>;
// @url js/file_info.d.ts
/** A FileInfo describes a file and is returned by `stat`, `lstat`,
* `statSync`, `lstatSync`. A list of FileInfo is returned by `readdir`,
* `readdirSync`. */
@ -1176,8 +1148,6 @@ declare namespace Deno {
isSymlink(): boolean;
}
// @url js/realpath.d.ts
/** Returns absolute normalized path with, symbolic links resolved.
*
* const realPath = Deno.realpathSync("./some/path");
@ -1192,8 +1162,6 @@ declare namespace Deno {
* Requires `allow-read` permission. */
export function realpath(path: string): Promise<string>;
// @url js/read_dir.d.ts
/** UNSTABLE: need to consider streaming case
*
* Synchronously reads the directory given by `path` and returns an array of
@ -1213,8 +1181,6 @@ declare namespace Deno {
* Requires `allow-read` permission. */
export function readdir(path: string): Promise<FileInfo[]>;
// @url js/copy_file.d.ts
/** Synchronously copies the contents and permissions of one file to another
* specified path, by default creating a new file if needed, else overwriting.
* Fails if target path is a directory or is unwritable.
@ -1235,8 +1201,6 @@ declare namespace Deno {
* Requires `allow-write` permission on toPath. */
export function copyFile(fromPath: string, toPath: string): Promise<void>;
// @url js/read_link.d.ts
/** Returns the destination of the named symbolic link.
*
* const targetPath = Deno.readlinkSync("symlink/path");
@ -1251,8 +1215,6 @@ declare namespace Deno {
* Requires `allow-read` permission. */
export function readlink(path: string): Promise<string>;
// @url js/stat.d.ts
/** Resolves to a `Deno.FileInfo` for the specified `path`. If `path` is a
* symlink, information for the symlink will be returned.
*
@ -1289,8 +1251,6 @@ declare namespace Deno {
* Requires `allow-read` permission. */
export function statSync(path: string): FileInfo;
// @url js/link.d.ts
/** Creates `newpath` as a hard link to `oldpath`.
*
* Deno.linkSync("old/name", "new/name");
@ -1305,8 +1265,6 @@ declare namespace Deno {
* Requires `allow-read` and `allow-write` permissions. */
export function link(oldpath: string, newpath: string): Promise<void>;
// @url js/symlink.d.ts
/** **UNSTABLE**: `type` argument type may be changed to `"dir" | "file"`.
*
* Creates `newpath` as a symbolic link to `oldpath`. The type argument can be
@ -1337,8 +1295,6 @@ declare namespace Deno {
type?: string
): Promise<void>;
// @url js/write_file.d.ts
/** Options for writing to a file. */
export interface WriteFileOptions {
/** Defaults to `false`. If set to `true`, will append to a file instead of
@ -1533,8 +1489,6 @@ declare namespace Deno {
constructor(state: PermissionState);
}
// @url js/truncate.d.ts
/** Synchronously truncates or extends the specified file, to reach the
* specified `len`.
*

View file

@ -291,8 +291,6 @@ declare interface ImportMeta {
}
declare namespace __domTypes {
// @url js/dom_types.d.ts
export type BufferSource = ArrayBufferView | ArrayBuffer;
export type HeadersInit =
| Headers
@ -872,8 +870,6 @@ declare namespace __domTypes {
}
declare namespace __blob {
// @url js/blob.d.ts
export const bytesSymbol: unique symbol;
export const blobBytesWeakMap: WeakMap<__domTypes.Blob, Uint8Array>;
export class DenoBlob implements __domTypes.Blob {
@ -890,8 +886,6 @@ declare namespace __blob {
}
declare namespace __console {
// @url js/console.d.ts
type ConsoleOptions = Partial<{
showHidden: boolean;
depth: number;
@ -979,8 +973,6 @@ declare namespace __console {
}
declare namespace __event {
// @url js/event.d.ts
export const eventAttributes: WeakMap<object, any>;
export class EventInit implements __domTypes.EventInit {
bubbles: boolean;
@ -1052,8 +1044,6 @@ declare namespace __event {
}
declare namespace __customEvent {
// @url js/custom_event.d.ts
export const customEventAttributes: WeakMap<object, any>;
export class CustomEventInit extends __event.EventInit
implements __domTypes.CustomEventInit {
@ -1080,8 +1070,6 @@ declare namespace __customEvent {
}
declare namespace __eventTarget {
// @url js/event_target.d.ts
export class EventListenerOptions implements __domTypes.EventListenerOptions {
_capture: boolean;
constructor({ capture }?: { capture?: boolean | undefined });
@ -1223,8 +1211,6 @@ declare namespace __io {
}
declare namespace __fetch {
// @url js/fetch.d.ts
class Body
implements __domTypes.Body, __domTypes.ReadableStream, __io.ReadCloser {
private rid;
@ -1285,8 +1271,6 @@ declare namespace __fetch {
}
declare namespace __textEncoding {
// @url js/text_encoding.d.ts
export function atob(s: string): string;
/** Creates a base-64 ASCII string from the input string. */
export function btoa(s: string): string;
@ -1328,8 +1312,6 @@ declare namespace __textEncoding {
}
declare namespace __timers {
// @url js/timers.d.ts
export type Args = unknown[];
/** Sets a timer which executes a function once after the timer expires. */
export function setTimeout(
@ -1348,8 +1330,6 @@ declare namespace __timers {
}
declare namespace __urlSearchParams {
// @url js/url_search_params.d.ts
export class URLSearchParams {
private params;
private url;
@ -1455,7 +1435,6 @@ declare namespace __urlSearchParams {
}
declare namespace __url {
// @url js/url.d.ts
export interface URL {
hash: string;
host: string;
@ -1482,7 +1461,6 @@ declare namespace __url {
}
declare namespace __workers {
// @url js/workers.d.ts
export interface Worker {
onerror?: (e: Event) => void;
onmessage?: (e: { data: any }) => void;
@ -1509,8 +1487,6 @@ declare namespace __workers {
}
declare namespace __performanceUtil {
// @url js/performance.d.ts
export class Performance {
/** Returns a current time from Deno's start in milliseconds.
*