Skip to content

Commit

Permalink
docs: remove references to Deno in descriptions and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ozwaldorf committed Jul 30, 2024
1 parent f6273be commit 0d15167
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 73 deletions.
74 changes: 20 additions & 54 deletions dts/lib.deno_web.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ declare interface DOMException extends Error {
/** @category Web APIs */
declare var DOMException: {
readonly prototype: DOMException;
new (message?: string, name?: string): DOMException;
new(message?: string, name?: string): DOMException;
readonly INDEX_SIZE_ERR: 1;
readonly DOMSTRING_SIZE_ERR: 2;
readonly HIERARCHY_REQUEST_ERR: 3;
Expand Down Expand Up @@ -279,7 +279,7 @@ declare interface TextDecoder {
/** @category Encoding API */
declare var TextDecoder: {
readonly prototype: TextDecoder;
new (label?: string, options?: TextDecoderOptions): TextDecoder;
new(label?: string, options?: TextDecoderOptions): TextDecoder;
};

/** @category Encoding API */
Expand All @@ -300,7 +300,7 @@ declare interface TextEncoder {
/** @category Encoding API */
declare var TextEncoder: {
readonly prototype: TextEncoder;
new (): TextEncoder;
new(): TextEncoder;
};

/** @category Encoding API */
Expand All @@ -319,7 +319,7 @@ declare interface TextDecoderStream {
/** @category Encoding API */
declare var TextDecoderStream: {
readonly prototype: TextDecoderStream;
new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
};

/** @category Encoding API */
Expand All @@ -334,7 +334,7 @@ declare interface TextEncoderStream {
/** @category Encoding API */
declare var TextEncoderStream: {
readonly prototype: TextEncoderStream;
new (): TextEncoderStream;
new(): TextEncoderStream;
};

/** A controller object that allows you to abort one or more DOM requests as and
Expand Down Expand Up @@ -415,8 +415,8 @@ declare interface FileReader extends EventTarget {
onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
onloadstart:
| ((this: FileReader, ev: ProgressEvent<FileReader>) => any)
| null;
| ((this: FileReader, ev: ProgressEvent<FileReader>) => any)
| null;
onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
readonly readyState: number;
readonly result: string | ArrayBuffer | null;
Expand Down Expand Up @@ -453,7 +453,7 @@ declare interface FileReader extends EventTarget {
/** @category Web File API */
declare var FileReader: {
readonly prototype: FileReader;
new (): FileReader;
new(): FileReader;
readonly DONE: number;
readonly EMPTY: number;
readonly LOADING: number;
Expand Down Expand Up @@ -493,7 +493,7 @@ declare interface Blob {
*/
declare var Blob: {
readonly prototype: Blob;
new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
};

/** @category Web File API */
Expand All @@ -518,7 +518,7 @@ declare interface File extends Blob {
*/
declare var File: {
readonly prototype: File;
new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
};

/** @category Streams API */
Expand Down Expand Up @@ -582,7 +582,7 @@ declare interface ReadableStreamBYOBReader {
/** @category Streams API */
declare var ReadableStreamBYOBReader: {
readonly prototype: ReadableStreamBYOBReader;
new (stream: ReadableStream<Uint8Array>): ReadableStreamBYOBReader;
new(stream: ReadableStream<Uint8Array>): ReadableStreamBYOBReader;
};

/** @category Streams API */
Expand All @@ -595,7 +595,7 @@ declare interface ReadableStreamBYOBRequest {
/** @category Streams API */
declare var ReadableStreamBYOBRequest: {
readonly prototype: ReadableStreamBYOBRequest;
new (): never;
new(): never;
};

/** @category Streams API */
Expand Down Expand Up @@ -650,7 +650,7 @@ declare interface ReadableStreamDefaultController<R = any> {
/** @category Streams API */
declare var ReadableStreamDefaultController: {
readonly prototype: ReadableStreamDefaultController;
new (): never;
new(): never;
};

/** @category Streams API */
Expand All @@ -665,7 +665,7 @@ declare interface ReadableByteStreamController {
/** @category Streams API */
declare var ReadableByteStreamController: {
readonly prototype: ReadableByteStreamController;
new (): never;
new(): never;
};

/** @category Streams API */
Expand Down Expand Up @@ -790,7 +790,7 @@ declare interface WritableStreamDefaultController {
/** @category Streams API */
declare var WritableStreamDefaultController: {
readonly prototype: WritableStreamDefaultController;
new (): never;
new(): never;
};

/** This Streams API interface is the object returned by
Expand Down Expand Up @@ -833,7 +833,7 @@ declare interface TransformStreamDefaultController<O = any> {
/** @category Streams API */
declare var TransformStreamDefaultController: {
readonly prototype: TransformStreamDefaultController;
new (): never;
new(): never;
};

/** @category Streams API */
Expand Down Expand Up @@ -923,7 +923,7 @@ declare interface MessageChannel {
*/
declare var MessageChannel: {
readonly prototype: MessageChannel;
new (): MessageChannel;
new(): MessageChannel;
};

/** @category DOM APIs */
Expand Down Expand Up @@ -990,19 +990,12 @@ declare interface MessagePort extends EventTarget {
*/
declare var MessagePort: {
readonly prototype: MessagePort;
new (): never;
new(): never;
};

/**
* An API for compressing a stream of data.
*
* @example
* ```ts
* await Deno.stdin.readable
* .pipeThrough(new CompressionStream("gzip"))
* .pipeTo(Deno.stdout.writable);
* ```
*
* @category Compression Streams API
*/
declare interface CompressionStream {
Expand All @@ -1013,13 +1006,6 @@ declare interface CompressionStream {
/**
* An API for compressing a stream of data.
*
* @example
* ```ts
* await Deno.stdin.readable
* .pipeThrough(new CompressionStream("gzip"))
* .pipeTo(Deno.stdout.writable);
* ```
*
* @category Compression Streams API
*/
declare var CompressionStream: {
Expand All @@ -1031,22 +1017,12 @@ declare var CompressionStream: {
* Throws a `TypeError` if the format passed to the constructor is not
* supported.
*/
new (format: string): CompressionStream;
new(format: string): CompressionStream;
};

/**
* An API for decompressing a stream of data.
*
* @example
* ```ts
* const input = await Deno.open("./file.txt.gz");
* const output = await Deno.create("./file.txt");
*
* await input.readable
* .pipeThrough(new DecompressionStream("gzip"))
* .pipeTo(output.writable);
* ```
*
* @category Compression Streams API
*/
declare interface DecompressionStream {
Expand All @@ -1057,16 +1033,6 @@ declare interface DecompressionStream {
/**
* An API for decompressing a stream of data.
*
* @example
* ```ts
* const input = await Deno.open("./file.txt.gz");
* const output = await Deno.create("./file.txt");
*
* await input.readable
* .pipeThrough(new DecompressionStream("gzip"))
* .pipeTo(output.writable);
* ```
*
* @category Compression Streams API
*/
declare var DecompressionStream: {
Expand All @@ -1078,5 +1044,5 @@ declare var DecompressionStream: {
* Throws a `TypeError` if the format passed to the constructor is not
* supported.
*/
new (format: string): DecompressionStream;
new(format: string): DecompressionStream;
};
3 changes: 0 additions & 3 deletions dts/lib.deno_websocket.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ declare interface WebSocketEventMap {
* Provides the API for creating and managing a WebSocket connection to a
* server, as well as for sending and receiving data on the connection.
*
* If you are looking to create a WebSocket server, please take a look at
* `Deno.upgradeWebSocket()`.
*
* @tags allow-net
* @category WebSockets
*/
Expand Down
28 changes: 12 additions & 16 deletions dts/lib.deno_window.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,60 +44,56 @@ declare interface Location {
* browsing contexts, from the parent browsing context to the top-level
* browsing context.
*
* Always empty in Deno. */
* Always empty. */
readonly ancestorOrigins: DOMStringList;
/** Returns the Location object's URL's fragment (includes leading "#" if
* non-empty).
*
* Cannot be set in Deno. */
* Cannot be set. */
hash: string;
/** Returns the Location object's URL's host and port (if different from the
* default port for the scheme).
*
* Cannot be set in Deno. */
* Cannot be set. */
host: string;
/** Returns the Location object's URL's host.
*
* Cannot be set in Deno. */
* Cannot be set. */
hostname: string;
/** Returns the Location object's URL.
*
* Cannot be set in Deno. */
* Cannot be set. */
href: string;
toString(): string;
/** Returns the Location object's URL's origin. */
readonly origin: string;
/** Returns the Location object's URL's path.
*
* Cannot be set in Deno. */
* Cannot be set. */
pathname: string;
/** Returns the Location object's URL's port.
*
* Cannot be set in Deno. */
* Cannot be set. */
port: string;
/** Returns the Location object's URL's scheme.
*
* Cannot be set in Deno. */
* Cannot be set. */
protocol: string;
/** Returns the Location object's URL's query (includes leading "?" if
* non-empty).
*
* Cannot be set in Deno. */
* Cannot be set. */
search: string;
/** Navigates to the given URL.
*
* Cannot be set in Deno. */
* Cannot be set. */
assign(url: string): void;
/** Reloads the current page.
*
* Disabled in Deno. */
/** Reloads the current page. Disabled. */
reload(): void;
/** @deprecated */
reload(forcedReload: boolean): void;
/** Removes the current page from the session history and navigates to the
* given URL.
*
* Disabled in Deno. */
* given URL. Disabled. */
replace(url: string): void;
}

Expand Down

0 comments on commit 0d15167

Please sign in to comment.