1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 00:29:09 -05:00

chore: place @deprecated tag after documentation block (#13037)

This commit is contained in:
Kitson Kelly 2021-12-10 11:05:50 +11:00 committed by GitHub
parent 0129c74fd9
commit 616ff1d482
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 31 deletions

View file

@ -654,9 +654,6 @@ declare namespace Deno {
} }
/** /**
* @deprecated Use `copy` from https://deno.land/std/streams/conversion.ts
* instead. `Deno.copy` will be removed in Deno 2.0.
*
* Copies from `src` to `dst` until either EOF (`null`) is read from `src` or * Copies from `src` to `dst` until either EOF (`null`) is read from `src` or
* an error occurs. It resolves to the number of bytes copied or rejects with * an error occurs. It resolves to the number of bytes copied or rejects with
* the first error encountered while copying. * the first error encountered while copying.
@ -668,6 +665,9 @@ declare namespace Deno {
* const bytesCopied2 = await Deno.copy(source, destination); * const bytesCopied2 = await Deno.copy(source, destination);
* ``` * ```
* *
* @deprecated Use `copy` from https://deno.land/std/streams/conversion.ts
* instead. `Deno.copy` will be removed in Deno 2.0.
*
* @param src The source to copy from * @param src The source to copy from
* @param dst The destination to copy to * @param dst The destination to copy to
* @param options Can be used to tune size of the buffer. Default size is 32kB * @param options Can be used to tune size of the buffer. Default size is 32kB
@ -681,10 +681,6 @@ declare namespace Deno {
): Promise<number>; ): Promise<number>;
/** /**
* @deprecated Use `iterateReader` from
* https://deno.land/std/streams/conversion.ts instead. `Deno.iter` will be
* removed in Deno 2.0.
*
* Turns a Reader, `r`, into an async iterator. * Turns a Reader, `r`, into an async iterator.
* *
* ```ts * ```ts
@ -713,6 +709,10 @@ declare namespace Deno {
* a view on that buffer on each iteration. It is therefore caller's * a view on that buffer on each iteration. It is therefore caller's
* responsibility to copy contents of the buffer if needed; otherwise the * responsibility to copy contents of the buffer if needed; otherwise the
* next iteration will overwrite contents of previously returned chunk. * next iteration will overwrite contents of previously returned chunk.
*
* @deprecated Use `iterateReader` from
* https://deno.land/std/streams/conversion.ts instead. `Deno.iter` will be
* removed in Deno 2.0.
*/ */
export function iter( export function iter(
r: Reader, r: Reader,
@ -722,10 +722,6 @@ declare namespace Deno {
): AsyncIterableIterator<Uint8Array>; ): AsyncIterableIterator<Uint8Array>;
/** /**
* @deprecated Use `iterateReaderSync` from
* https://deno.land/std/streams/conversion.ts instead. `Deno.iterSync` will
* be removed in Deno 2.0.
*
* Turns a ReaderSync, `r`, into an iterator. * Turns a ReaderSync, `r`, into an iterator.
* *
* ```ts * ```ts
@ -754,6 +750,10 @@ declare namespace Deno {
* a view on that buffer on each iteration. It is therefore caller's * a view on that buffer on each iteration. It is therefore caller's
* responsibility to copy contents of the buffer if needed; otherwise the * responsibility to copy contents of the buffer if needed; otherwise the
* next iteration will overwrite contents of previously returned chunk. * next iteration will overwrite contents of previously returned chunk.
*
* @deprecated Use `iterateReaderSync` from
* https://deno.land/std/streams/conversion.ts instead. `Deno.iterSync` will
* be removed in Deno 2.0.
*/ */
export function iterSync( export function iterSync(
r: ReaderSync, r: ReaderSync,
@ -1210,9 +1210,6 @@ declare namespace Deno {
} }
/** /**
* @deprecated Use `readAll` from https://deno.land/std/streams/conversion.ts
* instead. `Deno.readAll` will be removed in Deno 2.0.
*
* Read Reader `r` until EOF (`null`) and resolve to the content as * Read Reader `r` until EOF (`null`) and resolve to the content as
* Uint8Array`. * Uint8Array`.
* *
@ -1231,14 +1228,13 @@ declare namespace Deno {
* const reader = new Deno.Buffer(myData.buffer as ArrayBuffer); * const reader = new Deno.Buffer(myData.buffer as ArrayBuffer);
* const bufferContent = await Deno.readAll(reader); * const bufferContent = await Deno.readAll(reader);
* ``` * ```
*
* @deprecated Use `readAll` from https://deno.land/std/streams/conversion.ts
* instead. `Deno.readAll` will be removed in Deno 2.0.
*/ */
export function readAll(r: Reader): Promise<Uint8Array>; export function readAll(r: Reader): Promise<Uint8Array>;
/** /**
* @deprecated Use `readAllSync` from
* https://deno.land/std/streams/conversion.ts instead. `Deno.readAllSync`
* will be removed in Deno 2.0.
*
* Synchronously reads Reader `r` until EOF (`null`) and returns the content * Synchronously reads Reader `r` until EOF (`null`) and returns the content
* as `Uint8Array`. * as `Uint8Array`.
* *
@ -1257,13 +1253,14 @@ declare namespace Deno {
* const reader = new Deno.Buffer(myData.buffer as ArrayBuffer); * const reader = new Deno.Buffer(myData.buffer as ArrayBuffer);
* const bufferContent = Deno.readAllSync(reader); * const bufferContent = Deno.readAllSync(reader);
* ``` * ```
*
* @deprecated Use `readAllSync` from
* https://deno.land/std/streams/conversion.ts instead. `Deno.readAllSync`
* will be removed in Deno 2.0.
*/ */
export function readAllSync(r: ReaderSync): Uint8Array; export function readAllSync(r: ReaderSync): Uint8Array;
/** /**
* @deprecated Use `writeAll` from https://deno.land/std/streams/conversion.ts
* instead. `Deno.writeAll` will be removed in Deno 2.0.
*
* Write all the content of the array buffer (`arr`) to the writer (`w`). * Write all the content of the array buffer (`arr`) to the writer (`w`).
* *
* ```ts * ```ts
@ -1287,14 +1284,13 @@ declare namespace Deno {
* await Deno.writeAll(writer, contentBytes); * await Deno.writeAll(writer, contentBytes);
* console.log(writer.bytes().length); // 11 * console.log(writer.bytes().length); // 11
* ``` * ```
*
* @deprecated Use `writeAll` from https://deno.land/std/streams/conversion.ts
* instead. `Deno.writeAll` will be removed in Deno 2.0.
*/ */
export function writeAll(w: Writer, arr: Uint8Array): Promise<void>; export function writeAll(w: Writer, arr: Uint8Array): Promise<void>;
/** /**
* @deprecated Use `writeAllSync` from
* https://deno.land/std/streams/conversion.ts instead. `Deno.writeAllSync`
* will be removed in Deno 2.0.
*
* Synchronously write all the content of the array buffer (`arr`) to the * Synchronously write all the content of the array buffer (`arr`) to the
* writer (`w`). * writer (`w`).
* *
@ -1319,6 +1315,10 @@ declare namespace Deno {
* Deno.writeAllSync(writer, contentBytes); * Deno.writeAllSync(writer, contentBytes);
* console.log(writer.bytes().length); // 11 * console.log(writer.bytes().length); // 11
* ``` * ```
*
* @deprecated Use `writeAllSync` from
* https://deno.land/std/streams/conversion.ts instead. `Deno.writeAllSync`
* will be removed in Deno 2.0.
*/ */
export function writeAllSync(w: WriterSync, arr: Uint8Array): void; export function writeAllSync(w: WriterSync, arr: Uint8Array): void;
@ -2126,9 +2126,10 @@ declare namespace Deno {
readonly rid: number; readonly rid: number;
/** Stops watching the file system and closes the watcher resource. */ /** Stops watching the file system and closes the watcher resource. */
close(): void; close(): void;
/** @deprecated /**
* Stops watching the file system and closes the watcher resource. * Stops watching the file system and closes the watcher resource.
* Will be removed at 2.0. *
* @deprecated Will be removed at 2.0.
*/ */
return?(value?: any): Promise<IteratorResult<FsEvent>>; return?(value?: any): Promise<IteratorResult<FsEvent>>;
[Symbol.asyncIterator](): AsyncIterableIterator<FsEvent>; [Symbol.asyncIterator](): AsyncIterableIterator<FsEvent>;
@ -2564,11 +2565,12 @@ declare namespace Deno {
export const args: string[]; export const args: string[];
/** /**
* @deprecated A symbol which can be used as a key for a custom method which will be * A symbol which can be used as a key for a custom method which will be
* called when `Deno.inspect()` is called, or when the object is logged to * called when `Deno.inspect()` is called, or when the object is logged to
* the console. * the console.
* *
* This symbol is deprecated since 1.9. Use `Symbol.for("Deno.customInspect")` instead. * @deprecated This symbol is deprecated since 1.9. Use
* `Symbol.for("Deno.customInspect")` instead.
*/ */
export const customInspect: unique symbol; export const customInspect: unique symbol;

View file

@ -139,10 +139,10 @@ declare namespace Deno {
* If not specified, defaults to `127.0.0.1`. */ * If not specified, defaults to `127.0.0.1`. */
hostname?: string; hostname?: string;
/** /**
* Server certificate file.
*
* @deprecated This option is deprecated and will be removed in a future * @deprecated This option is deprecated and will be removed in a future
* release. * release.
*
* Server certificate file.
*/ */
certFile?: string; certFile?: string;
/** A list of root certificates that will be used in addition to the /** A list of root certificates that will be used in addition to the