Skip to content

Commit

Permalink
chore: place @deprecated tag after documentation block (denoland#13037
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kitsonk authored Dec 10, 2021
1 parent 0129c74 commit 616ff1d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
60 changes: 31 additions & 29 deletions cli/dts/lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
* an error occurs. It resolves to the number of bytes copied or rejects with
* the first error encountered while copying.
Expand All @@ -668,6 +665,9 @@ declare namespace Deno {
* 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 dst The destination to copy to
* @param options Can be used to tune size of the buffer. Default size is 32kB
Expand All @@ -681,10 +681,6 @@ declare namespace Deno {
): 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.
*
* ```ts
Expand Down Expand Up @@ -713,6 +709,10 @@ declare namespace Deno {
* a view on that buffer on each iteration. It is therefore caller's
* responsibility to copy contents of the buffer if needed; otherwise the
* 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(
r: Reader,
Expand All @@ -722,10 +722,6 @@ declare namespace Deno {
): 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.
*
* ```ts
Expand Down Expand Up @@ -754,6 +750,10 @@ declare namespace Deno {
* a view on that buffer on each iteration. It is therefore caller's
* responsibility to copy contents of the buffer if needed; otherwise the
* 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(
r: ReaderSync,
Expand Down Expand Up @@ -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
* Uint8Array`.
*
Expand All @@ -1231,14 +1228,13 @@ declare namespace Deno {
* const reader = new Deno.Buffer(myData.buffer as ArrayBuffer);
* 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>;

/**
* @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
* as `Uint8Array`.
*
Expand All @@ -1257,13 +1253,14 @@ declare namespace Deno {
* const reader = new Deno.Buffer(myData.buffer as ArrayBuffer);
* 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;

/**
* @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`).
*
* ```ts
Expand All @@ -1287,14 +1284,13 @@ declare namespace Deno {
* await Deno.writeAll(writer, contentBytes);
* 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>;

/**
* @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
* writer (`w`).
*
Expand All @@ -1319,6 +1315,10 @@ declare namespace Deno {
* Deno.writeAllSync(writer, contentBytes);
* 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;

Expand Down Expand Up @@ -2126,9 +2126,10 @@ declare namespace Deno {
readonly rid: number;
/** Stops watching the file system and closes the watcher resource. */
close(): void;
/** @deprecated
/**
* 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>>;
[Symbol.asyncIterator](): AsyncIterableIterator<FsEvent>;
Expand Down Expand Up @@ -2564,11 +2565,12 @@ declare namespace Deno {
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
* 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;

Expand Down
4 changes: 2 additions & 2 deletions ext/net/lib.deno_net.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ declare namespace Deno {
* If not specified, defaults to `127.0.0.1`. */
hostname?: string;
/**
* Server certificate file.
*
* @deprecated This option is deprecated and will be removed in a future
* release.
*
* Server certificate file.
*/
certFile?: string;
/** A list of root certificates that will be used in addition to the
Expand Down

0 comments on commit 616ff1d

Please sign in to comment.