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

View file

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