mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
chore: add code generation for @types/deno (#25545)
This commit is contained in:
parent
e1c8d2755e
commit
33f169beb9
19 changed files with 485 additions and 356 deletions
62
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
62
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -212,7 +212,7 @@ declare namespace Deno {
|
|||
* @category Cloud
|
||||
* @experimental
|
||||
*/
|
||||
export function openKv(path?: string): Promise<Deno.Kv>;
|
||||
export function openKv(path?: string): Promise<Kv>;
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
|
@ -475,7 +475,11 @@ declare namespace Deno {
|
|||
* @category Cloud
|
||||
* @experimental
|
||||
*/
|
||||
export type KvEntry<T> = { key: KvKey; value: T; versionstamp: string };
|
||||
export interface KvEntry<T> {
|
||||
key: KvKey;
|
||||
value: T;
|
||||
versionstamp: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* **UNSTABLE**: New API, yet to be vetted.
|
||||
|
@ -680,7 +684,7 @@ declare namespace Deno {
|
|||
value: unknown,
|
||||
options?: {
|
||||
delay?: number;
|
||||
keysIfUndelivered?: Deno.KvKey[];
|
||||
keysIfUndelivered?: KvKey[];
|
||||
backoffSchedule?: number[];
|
||||
},
|
||||
): this;
|
||||
|
@ -911,7 +915,7 @@ declare namespace Deno {
|
|||
value: unknown,
|
||||
options?: {
|
||||
delay?: number;
|
||||
keysIfUndelivered?: Deno.KvKey[];
|
||||
keysIfUndelivered?: KvKey[];
|
||||
backoffSchedule?: number[];
|
||||
},
|
||||
): Promise<KvCommitResult>;
|
||||
|
@ -1041,10 +1045,10 @@ declare namespace Deno {
|
|||
* @category Jupyter
|
||||
* @experimental
|
||||
*/
|
||||
export type VegaObject = {
|
||||
export interface VegaObject {
|
||||
$schema: string;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A collection of supported media types and data for Jupyter frontends.
|
||||
|
@ -1052,7 +1056,7 @@ declare namespace Deno {
|
|||
* @category Jupyter
|
||||
* @experimental
|
||||
*/
|
||||
export type MediaBundle = {
|
||||
export interface MediaBundle {
|
||||
"text/plain"?: string;
|
||||
"text/html"?: string;
|
||||
"image/svg+xml"?: string;
|
||||
|
@ -1078,7 +1082,7 @@ declare namespace Deno {
|
|||
|
||||
// Must support a catch all for custom media types / mimetypes
|
||||
[key: string]: string | object | undefined;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @category Jupyter
|
||||
|
@ -1090,9 +1094,9 @@ declare namespace Deno {
|
|||
* @category Jupyter
|
||||
* @experimental
|
||||
*/
|
||||
export type Displayable = {
|
||||
export interface Displayable {
|
||||
[$display]: () => MediaBundle | Promise<MediaBundle>;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Display function for Jupyter Deno Kernel.
|
||||
|
@ -1217,7 +1221,11 @@ declare namespace Deno {
|
|||
buffers?: Uint8Array[];
|
||||
},
|
||||
): Promise<void>;
|
||||
|
||||
export {}; // only export exports
|
||||
}
|
||||
|
||||
export {}; // only export exports
|
||||
}
|
||||
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
|
@ -1225,7 +1233,7 @@ declare namespace Deno {
|
|||
* @category Workers
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WorkerOptions {
|
||||
interface WorkerOptions {
|
||||
/** **UNSTABLE**: New API, yet to be vetted.
|
||||
*
|
||||
* Configure permissions options to change the level of access the worker will
|
||||
|
@ -1266,7 +1274,7 @@ declare interface WorkerOptions {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketStreamOptions {
|
||||
interface WebSocketStreamOptions {
|
||||
protocols?: string[];
|
||||
signal?: AbortSignal;
|
||||
headers?: HeadersInit;
|
||||
|
@ -1277,7 +1285,7 @@ declare interface WebSocketStreamOptions {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketConnection {
|
||||
interface WebSocketConnection {
|
||||
readable: ReadableStream<string | Uint8Array>;
|
||||
writable: WritableStream<string | Uint8Array>;
|
||||
extensions: string;
|
||||
|
@ -1289,7 +1297,7 @@ declare interface WebSocketConnection {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketCloseInfo {
|
||||
interface WebSocketCloseInfo {
|
||||
code?: number;
|
||||
reason?: string;
|
||||
}
|
||||
|
@ -1300,7 +1308,7 @@ declare interface WebSocketCloseInfo {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketStream {
|
||||
interface WebSocketStream {
|
||||
url: string;
|
||||
opened: Promise<WebSocketConnection>;
|
||||
closed: Promise<WebSocketCloseInfo>;
|
||||
|
@ -1324,7 +1332,7 @@ declare var WebSocketStream: {
|
|||
* @category WebSockets
|
||||
* @experimental
|
||||
*/
|
||||
declare interface WebSocketError extends DOMException {
|
||||
interface WebSocketError extends DOMException {
|
||||
readonly closeCode: number;
|
||||
readonly reason: string;
|
||||
}
|
||||
|
@ -2884,7 +2892,7 @@ declare namespace Temporal {
|
|||
* @category Temporal
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Date {
|
||||
interface Date {
|
||||
toTemporalInstant(): Temporal.Instant;
|
||||
}
|
||||
|
||||
|
@ -2986,7 +2994,7 @@ declare namespace Intl {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
/**
|
||||
* The size in bytes of each element in the array.
|
||||
*/
|
||||
|
@ -3301,7 +3309,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16ArrayConstructor {
|
||||
interface Float16ArrayConstructor {
|
||||
readonly prototype: Float16Array;
|
||||
new (length: number): Float16Array;
|
||||
new (array: ArrayLike<number> | ArrayBufferLike): Float16Array;
|
||||
|
@ -3350,7 +3358,7 @@ declare var Float16Array: Float16ArrayConstructor;
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
[Symbol.iterator](): IterableIterator<number>;
|
||||
/**
|
||||
* Returns an array of key, value pairs for every entry in the array
|
||||
|
@ -3370,7 +3378,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Constructor {
|
||||
interface Float16Constructor {
|
||||
new (elements: Iterable<number>): Float16Array;
|
||||
|
||||
/**
|
||||
|
@ -3390,7 +3398,7 @@ declare interface Float16Constructor {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
readonly [Symbol.toStringTag]: "Float16Array";
|
||||
}
|
||||
|
||||
|
@ -3398,7 +3406,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
/**
|
||||
* Determines whether an array includes a certain element, returning true or false as appropriate.
|
||||
* @param searchElement The element to search for.
|
||||
|
@ -3411,7 +3419,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16ArrayConstructor {
|
||||
interface Float16ArrayConstructor {
|
||||
new (): Float16Array;
|
||||
}
|
||||
|
||||
|
@ -3419,7 +3427,7 @@ declare interface Float16ArrayConstructor {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
/**
|
||||
* Returns the item located at the specified index.
|
||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
||||
|
@ -3431,7 +3439,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface Float16Array {
|
||||
interface Float16Array {
|
||||
/**
|
||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
||||
* otherwise.
|
||||
|
@ -3507,7 +3515,7 @@ declare interface Float16Array {
|
|||
* @category Platform
|
||||
* @experimental
|
||||
*/
|
||||
declare interface DataView {
|
||||
interface DataView {
|
||||
/**
|
||||
* Gets the Float16 value at the specified byte offset from the start of the view. There is
|
||||
* no alignment constraint; multi-byte values may be fetched from any offset.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue