@cloudflare/workers-types 5.20261110.1 → 5.20261113.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/experimental/index.d.ts +1541 -1527
- package/experimental/index.ts +1541 -1527
- package/index.d.ts +939 -931
- package/index.ts +939 -931
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -3422,1096 +3422,741 @@ export interface TraceMetrics {
|
|
|
3422
3422
|
export interface UnsafeTraceMetrics {
|
|
3423
3423
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
3424
3424
|
}
|
|
3425
|
+
export type WebSocketEventMap = {
|
|
3426
|
+
close: CloseEvent;
|
|
3427
|
+
message: MessageEvent;
|
|
3428
|
+
open: Event;
|
|
3429
|
+
error: ErrorEvent;
|
|
3430
|
+
};
|
|
3425
3431
|
/**
|
|
3426
|
-
* The **`
|
|
3432
|
+
* The **`WebSocket`** object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
3427
3433
|
*
|
|
3428
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3434
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3429
3435
|
*/
|
|
3430
|
-
export declare
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
set href(value: string);
|
|
3450
|
-
/**
|
|
3451
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
3452
|
-
*
|
|
3453
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3454
|
-
*/
|
|
3455
|
-
get protocol(): string;
|
|
3456
|
-
/**
|
|
3457
|
-
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
3458
|
-
*
|
|
3459
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3460
|
-
*/
|
|
3461
|
-
set protocol(value: string);
|
|
3462
|
-
/**
|
|
3463
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
3464
|
-
*
|
|
3465
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3466
|
-
*/
|
|
3467
|
-
get username(): string;
|
|
3468
|
-
/**
|
|
3469
|
-
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
3470
|
-
*
|
|
3471
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3472
|
-
*/
|
|
3473
|
-
set username(value: string);
|
|
3474
|
-
/**
|
|
3475
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
3476
|
-
*
|
|
3477
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3478
|
-
*/
|
|
3479
|
-
get password(): string;
|
|
3480
|
-
/**
|
|
3481
|
-
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
3482
|
-
*
|
|
3483
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3484
|
-
*/
|
|
3485
|
-
set password(value: string);
|
|
3486
|
-
/**
|
|
3487
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
3488
|
-
*
|
|
3489
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3490
|
-
*/
|
|
3491
|
-
get host(): string;
|
|
3492
|
-
/**
|
|
3493
|
-
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
3494
|
-
*
|
|
3495
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3496
|
-
*/
|
|
3497
|
-
set host(value: string);
|
|
3498
|
-
/**
|
|
3499
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
3500
|
-
*
|
|
3501
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3502
|
-
*/
|
|
3503
|
-
get hostname(): string;
|
|
3504
|
-
/**
|
|
3505
|
-
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
3506
|
-
*
|
|
3507
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3508
|
-
*/
|
|
3509
|
-
set hostname(value: string);
|
|
3510
|
-
/**
|
|
3511
|
-
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
3512
|
-
*
|
|
3513
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3514
|
-
*/
|
|
3515
|
-
get port(): string;
|
|
3436
|
+
export declare var WebSocket: {
|
|
3437
|
+
prototype: WebSocket;
|
|
3438
|
+
new (url: string, protocols?: string[] | string): WebSocket;
|
|
3439
|
+
readonly READY_STATE_CONNECTING: number;
|
|
3440
|
+
readonly CONNECTING: number;
|
|
3441
|
+
readonly READY_STATE_OPEN: number;
|
|
3442
|
+
readonly OPEN: number;
|
|
3443
|
+
readonly READY_STATE_CLOSING: number;
|
|
3444
|
+
readonly CLOSING: number;
|
|
3445
|
+
readonly READY_STATE_CLOSED: number;
|
|
3446
|
+
readonly CLOSED: number;
|
|
3447
|
+
};
|
|
3448
|
+
/**
|
|
3449
|
+
* The **`WebSocket`** object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
3450
|
+
*
|
|
3451
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3452
|
+
*/
|
|
3453
|
+
export interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
3454
|
+
accept(options?: WebSocketAcceptOptions): void;
|
|
3516
3455
|
/**
|
|
3517
|
-
* The **`
|
|
3456
|
+
* The **`WebSocket.send()`** method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of bufferedAmount by the number of bytes needed to contain the data. If the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically. The browser will throw an exception if you call send() when the connection is in the CONNECTING state. If you call send() when the connection is in the CLOSING or CLOSED states, the browser will silently discard the data.
|
|
3518
3457
|
*
|
|
3519
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3458
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
|
|
3520
3459
|
*/
|
|
3521
|
-
|
|
3460
|
+
send(message: (ArrayBuffer | ArrayBufferView) | string): void;
|
|
3522
3461
|
/**
|
|
3523
|
-
* The **`
|
|
3462
|
+
* The **`WebSocket.close()`** method closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing.
|
|
3524
3463
|
*
|
|
3525
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3464
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
|
|
3526
3465
|
*/
|
|
3527
|
-
|
|
3466
|
+
close(code?: number, reason?: string): void;
|
|
3467
|
+
serializeAttachment(attachment: any): void;
|
|
3468
|
+
deserializeAttachment(): any | null;
|
|
3528
3469
|
/**
|
|
3529
|
-
* The **`
|
|
3470
|
+
* The **`WebSocket.readyState`** read-only property returns the current state of the WebSocket connection.
|
|
3530
3471
|
*
|
|
3531
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3472
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
3532
3473
|
*/
|
|
3533
|
-
|
|
3474
|
+
readyState: number;
|
|
3534
3475
|
/**
|
|
3535
|
-
* The **`
|
|
3476
|
+
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
3536
3477
|
*
|
|
3537
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3478
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
|
|
3538
3479
|
*/
|
|
3539
|
-
|
|
3480
|
+
url: string | null;
|
|
3540
3481
|
/**
|
|
3541
|
-
* The **`
|
|
3482
|
+
* The **`WebSocket.protocol`** read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the protocols parameter when creating the WebSocket object, or the empty string if no connection is established.
|
|
3542
3483
|
*
|
|
3543
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3484
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
3544
3485
|
*/
|
|
3545
|
-
|
|
3486
|
+
protocol: string | null;
|
|
3546
3487
|
/**
|
|
3547
|
-
* The **`
|
|
3488
|
+
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server. This is currently only the empty string or a list of extensions as negotiated by the connection.
|
|
3548
3489
|
*
|
|
3549
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3490
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3550
3491
|
*/
|
|
3551
|
-
|
|
3492
|
+
extensions: string | null;
|
|
3552
3493
|
/**
|
|
3553
|
-
* The **`
|
|
3494
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3554
3495
|
*
|
|
3555
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3496
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3556
3497
|
*/
|
|
3557
|
-
|
|
3498
|
+
binaryType: "blob" | "arraybuffer";
|
|
3499
|
+
}
|
|
3500
|
+
export interface WebSocketAcceptOptions {
|
|
3558
3501
|
/**
|
|
3559
|
-
*
|
|
3560
|
-
*
|
|
3561
|
-
*
|
|
3502
|
+
* When set to `true`, receiving a server-initiated WebSocket Close frame will not
|
|
3503
|
+
* automatically send a reciprocal Close frame, leaving the connection in a half-open
|
|
3504
|
+
* state. This is useful for proxying scenarios where you need to coordinate closing
|
|
3505
|
+
* both sides independently. Defaults to `false` when the
|
|
3506
|
+
* `no_web_socket_half_open_by_default` compatibility flag is enabled.
|
|
3562
3507
|
*/
|
|
3563
|
-
|
|
3508
|
+
allowHalfOpen?: boolean;
|
|
3509
|
+
}
|
|
3510
|
+
export declare const WebSocketPair: {
|
|
3511
|
+
new (): {
|
|
3512
|
+
0: WebSocket;
|
|
3513
|
+
1: WebSocket;
|
|
3514
|
+
};
|
|
3515
|
+
};
|
|
3516
|
+
export interface SqlStorage {
|
|
3517
|
+
exec<T extends Record<string, SqlStorageValue>>(
|
|
3518
|
+
query: string,
|
|
3519
|
+
...bindings: any[]
|
|
3520
|
+
): SqlStorageCursor<T>;
|
|
3521
|
+
get databaseSize(): number;
|
|
3522
|
+
Cursor: typeof SqlStorageCursor;
|
|
3523
|
+
Statement: typeof SqlStorageStatement;
|
|
3524
|
+
}
|
|
3525
|
+
export declare abstract class SqlStorageStatement {}
|
|
3526
|
+
export type SqlStorageValue = ArrayBuffer | string | number | null;
|
|
3527
|
+
export declare abstract class SqlStorageCursor<
|
|
3528
|
+
T extends Record<string, SqlStorageValue>,
|
|
3529
|
+
> {
|
|
3530
|
+
next(): IteratorResult<T, undefined>;
|
|
3531
|
+
toArray(): T[];
|
|
3532
|
+
one(): T;
|
|
3533
|
+
raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
|
|
3534
|
+
columnNames: string[];
|
|
3535
|
+
get rowsRead(): number;
|
|
3536
|
+
get rowsWritten(): number;
|
|
3537
|
+
[Symbol.iterator](): IterableIterator<T>;
|
|
3538
|
+
}
|
|
3539
|
+
export interface Socket {
|
|
3540
|
+
get readable(): ReadableStream;
|
|
3541
|
+
get writable(): WritableStream;
|
|
3542
|
+
get closed(): Promise<void>;
|
|
3543
|
+
get opened(): Promise<SocketInfo>;
|
|
3544
|
+
get upgraded(): boolean;
|
|
3545
|
+
get secureTransport(): "on" | "off" | "starttls";
|
|
3546
|
+
close(): Promise<void>;
|
|
3547
|
+
startTls(options?: TlsOptions): Socket;
|
|
3548
|
+
}
|
|
3549
|
+
export interface SocketOptions {
|
|
3550
|
+
secureTransport?: string;
|
|
3551
|
+
allowHalfOpen: boolean;
|
|
3552
|
+
highWaterMark?: number | bigint;
|
|
3553
|
+
}
|
|
3554
|
+
export interface SocketAddress {
|
|
3555
|
+
hostname: string;
|
|
3556
|
+
port: number;
|
|
3557
|
+
}
|
|
3558
|
+
export interface TlsOptions {
|
|
3559
|
+
expectedServerHostname?: string;
|
|
3560
|
+
}
|
|
3561
|
+
export interface SocketInfo {
|
|
3562
|
+
remoteAddress?: string;
|
|
3563
|
+
localAddress?: string;
|
|
3564
|
+
}
|
|
3565
|
+
/**
|
|
3566
|
+
* The **`EventSource`** interface is web content's interface to server-sent events.
|
|
3567
|
+
*
|
|
3568
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource)
|
|
3569
|
+
*/
|
|
3570
|
+
export declare class EventSource extends EventTarget {
|
|
3571
|
+
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3564
3572
|
/**
|
|
3565
|
-
* The **`
|
|
3573
|
+
* The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the EventSource.readyState attribute to 2 (closed).
|
|
3566
3574
|
*
|
|
3567
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3575
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
3568
3576
|
*/
|
|
3569
|
-
|
|
3570
|
-
/*function toString() { [native code] }*/
|
|
3571
|
-
toString(): string;
|
|
3577
|
+
close(): void;
|
|
3572
3578
|
/**
|
|
3573
|
-
* The **`
|
|
3579
|
+
* The **`url`** read-only property of the EventSource interface returns a string representing the URL of the source.
|
|
3574
3580
|
*
|
|
3575
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3581
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3576
3582
|
*/
|
|
3577
|
-
|
|
3583
|
+
get url(): string;
|
|
3578
3584
|
/**
|
|
3579
|
-
* The **`
|
|
3585
|
+
* The **`withCredentials`** read-only property of the EventSource interface returns a boolean value indicating whether the EventSource object was instantiated with CORS credentials set.
|
|
3580
3586
|
*
|
|
3581
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3587
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3582
3588
|
*/
|
|
3583
|
-
|
|
3589
|
+
get withCredentials(): boolean;
|
|
3584
3590
|
/**
|
|
3585
|
-
* The **`
|
|
3591
|
+
* The **`readyState`** read-only property of the EventSource interface returns a number representing the state of the connection.
|
|
3586
3592
|
*
|
|
3587
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3593
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3588
3594
|
*/
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3595
|
+
get readyState(): number;
|
|
3596
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3597
|
+
get onopen(): any | null;
|
|
3598
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3599
|
+
set onopen(value: any | null);
|
|
3600
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3601
|
+
get onmessage(): any | null;
|
|
3602
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3603
|
+
set onmessage(value: any | null);
|
|
3604
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3605
|
+
get onerror(): any | null;
|
|
3606
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3607
|
+
set onerror(value: any | null);
|
|
3608
|
+
static readonly CONNECTING: number;
|
|
3609
|
+
static readonly OPEN: number;
|
|
3610
|
+
static readonly CLOSED: number;
|
|
3611
|
+
static from(stream: ReadableStream): EventSource;
|
|
3612
|
+
}
|
|
3613
|
+
export interface EventSourceEventSourceInit {
|
|
3614
|
+
withCredentials?: boolean;
|
|
3615
|
+
fetcher?: Fetcher;
|
|
3616
|
+
}
|
|
3617
|
+
export interface ExecOutput {
|
|
3618
|
+
readonly stdout: ArrayBuffer;
|
|
3619
|
+
readonly stderr: ArrayBuffer;
|
|
3620
|
+
readonly exitCode: number;
|
|
3621
|
+
}
|
|
3622
|
+
export interface ContainerExecOptions {
|
|
3623
|
+
cwd?: string;
|
|
3624
|
+
env?: Record<string, string>;
|
|
3625
|
+
user?: string;
|
|
3626
|
+
signal?: AbortSignal;
|
|
3627
|
+
pty?: boolean | ContainerExecPtyOptions;
|
|
3628
|
+
stdin?: ReadableStream | "pipe";
|
|
3629
|
+
stdout?: "pipe" | "ignore";
|
|
3630
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3631
|
+
}
|
|
3632
|
+
export interface ContainerExecPtyOptions {
|
|
3633
|
+
cols?: number;
|
|
3634
|
+
rows?: number;
|
|
3635
|
+
}
|
|
3636
|
+
export interface ExecProcess {
|
|
3637
|
+
readonly stdin: WritableStream | null;
|
|
3638
|
+
readonly stdout: ReadableStream | null;
|
|
3639
|
+
readonly stderr: ReadableStream | null;
|
|
3640
|
+
readonly pid: number;
|
|
3641
|
+
readonly isPty: boolean;
|
|
3642
|
+
readonly exitCode: Promise<number>;
|
|
3643
|
+
output(): Promise<ExecOutput>;
|
|
3644
|
+
kill(signal?: number): void;
|
|
3645
|
+
resize(cols: number, rows: number): void;
|
|
3646
|
+
}
|
|
3647
|
+
export interface Container {
|
|
3648
|
+
get running(): boolean;
|
|
3649
|
+
get images(): Record<string, string>;
|
|
3650
|
+
start(options?: ContainerStartupOptions): void;
|
|
3651
|
+
monitor(): Promise<void>;
|
|
3652
|
+
destroy(error?: any): Promise<void>;
|
|
3653
|
+
signal(signo: number): void;
|
|
3654
|
+
getTcpPort(port: number): Fetcher;
|
|
3655
|
+
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
3656
|
+
interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
|
|
3657
|
+
interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
|
|
3658
|
+
snapshotContainer(
|
|
3659
|
+
options?: ContainerSnapshotOptions,
|
|
3660
|
+
): Promise<ContainerSnapshot>;
|
|
3661
|
+
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3662
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3663
|
+
inspect(): Promise<ContainerInfo | null>;
|
|
3664
|
+
}
|
|
3665
|
+
export interface ContainerDirectorySnapshot {
|
|
3666
|
+
id: string;
|
|
3667
|
+
size: number;
|
|
3668
|
+
dir: string;
|
|
3669
|
+
name?: string;
|
|
3670
|
+
}
|
|
3671
|
+
export type ContainerDirectorySnapshotRestoreParams =
|
|
3672
|
+
| {
|
|
3673
|
+
snapshot: ContainerDirectorySnapshot;
|
|
3674
|
+
mountPoint?: string;
|
|
3675
|
+
}
|
|
3676
|
+
| {
|
|
3677
|
+
snapshot?: undefined;
|
|
3678
|
+
mountPoint: string;
|
|
3679
|
+
};
|
|
3680
|
+
export interface ContainerSnapshot {
|
|
3681
|
+
id: string;
|
|
3682
|
+
size: number;
|
|
3683
|
+
name?: string;
|
|
3684
|
+
}
|
|
3685
|
+
export interface ContainerSnapshotRestoreParams {
|
|
3686
|
+
id: string;
|
|
3687
|
+
}
|
|
3688
|
+
export interface ContainerSnapshotOptions {
|
|
3689
|
+
name?: string;
|
|
3690
|
+
}
|
|
3691
|
+
export type ContainerStartupOptions = {
|
|
3692
|
+
entrypoint?: string[];
|
|
3693
|
+
enableInternet?: boolean;
|
|
3694
|
+
env?: Record<string, string>;
|
|
3695
|
+
instance?:
|
|
3696
|
+
| "lite"
|
|
3697
|
+
| "basic"
|
|
3698
|
+
| "standard-1"
|
|
3699
|
+
| "standard-2"
|
|
3700
|
+
| "standard-3"
|
|
3701
|
+
| "standard-4"
|
|
3702
|
+
| ContainerStartResources;
|
|
3703
|
+
labels?: Record<string, string>;
|
|
3704
|
+
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
3705
|
+
} & (
|
|
3706
|
+
| {
|
|
3707
|
+
image: string;
|
|
3708
|
+
containerSnapshot?: never;
|
|
3709
|
+
}
|
|
3710
|
+
| {
|
|
3711
|
+
image?: never;
|
|
3712
|
+
containerSnapshot?: ContainerSnapshotRestoreParams;
|
|
3713
|
+
}
|
|
3714
|
+
);
|
|
3715
|
+
export interface ContainerInfo {
|
|
3716
|
+
labels: Record<string, string>;
|
|
3717
|
+
image: string;
|
|
3718
|
+
}
|
|
3719
|
+
export interface ContainerStartResources {
|
|
3720
|
+
vcpu: number;
|
|
3721
|
+
memoryMib: number;
|
|
3722
|
+
diskMb: number;
|
|
3596
3723
|
}
|
|
3597
3724
|
/**
|
|
3598
|
-
* The **`
|
|
3725
|
+
* The **`MessagePort`** interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other.
|
|
3599
3726
|
*
|
|
3600
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3727
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort)
|
|
3601
3728
|
*/
|
|
3602
|
-
export declare class
|
|
3603
|
-
constructor(
|
|
3604
|
-
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
3605
|
-
);
|
|
3606
|
-
/**
|
|
3607
|
-
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
3608
|
-
*
|
|
3609
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
3610
|
-
*/
|
|
3611
|
-
get size(): number;
|
|
3612
|
-
/**
|
|
3613
|
-
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
3614
|
-
*
|
|
3615
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
3616
|
-
*/
|
|
3617
|
-
append(name: string, value: string): void;
|
|
3618
|
-
/**
|
|
3619
|
-
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
3620
|
-
*
|
|
3621
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
3622
|
-
*/
|
|
3623
|
-
delete(name: string, value?: string): void;
|
|
3624
|
-
/**
|
|
3625
|
-
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
3626
|
-
*
|
|
3627
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
3628
|
-
*/
|
|
3629
|
-
get(name: string): string | null;
|
|
3630
|
-
/**
|
|
3631
|
-
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
3632
|
-
*
|
|
3633
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
3634
|
-
*/
|
|
3635
|
-
getAll(name: string): string[];
|
|
3729
|
+
export declare abstract class MessagePort extends EventTarget {
|
|
3636
3730
|
/**
|
|
3637
|
-
* The **`
|
|
3731
|
+
* The **`postMessage()`** method of the MessagePort interface sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
|
|
3638
3732
|
*
|
|
3639
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3733
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
|
|
3640
3734
|
*/
|
|
3641
|
-
|
|
3735
|
+
postMessage(
|
|
3736
|
+
data?: any,
|
|
3737
|
+
options?: any[] | MessagePortPostMessageOptions,
|
|
3738
|
+
): void;
|
|
3642
3739
|
/**
|
|
3643
|
-
* The **`
|
|
3740
|
+
* The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active. This stops the flow of messages to that port.
|
|
3644
3741
|
*
|
|
3645
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3742
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
|
|
3646
3743
|
*/
|
|
3647
|
-
|
|
3744
|
+
close(): void;
|
|
3648
3745
|
/**
|
|
3649
|
-
* The **`
|
|
3746
|
+
* The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port. This method is only needed when using EventTarget.addEventListener; it is implied when using onmessage.
|
|
3650
3747
|
*
|
|
3651
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3748
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
|
|
3652
3749
|
*/
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
values(): IterableIterator<string>;
|
|
3657
|
-
forEach<This = unknown>(
|
|
3658
|
-
callback: (
|
|
3659
|
-
this: This,
|
|
3660
|
-
value: string,
|
|
3661
|
-
key: string,
|
|
3662
|
-
parent: URLSearchParams,
|
|
3663
|
-
) => void,
|
|
3664
|
-
thisArg?: This,
|
|
3665
|
-
): void;
|
|
3666
|
-
/*function toString() { [native code] }*/
|
|
3667
|
-
toString(): string;
|
|
3668
|
-
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
3750
|
+
start(): void;
|
|
3751
|
+
get onmessage(): any | null;
|
|
3752
|
+
set onmessage(value: any | null);
|
|
3669
3753
|
}
|
|
3670
3754
|
/**
|
|
3671
|
-
* The **`
|
|
3755
|
+
* The **`MessageChannel`** interface of the Channel Messaging API allows us to create a new message channel and send data through it via its two MessagePort properties.
|
|
3672
3756
|
*
|
|
3673
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3757
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel)
|
|
3674
3758
|
*/
|
|
3675
|
-
export declare class
|
|
3676
|
-
constructor(
|
|
3677
|
-
input?: string | URLPatternInit,
|
|
3678
|
-
baseURL?: string | URLPatternOptions,
|
|
3679
|
-
patternOptions?: URLPatternOptions,
|
|
3680
|
-
);
|
|
3681
|
-
/**
|
|
3682
|
-
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
3683
|
-
*
|
|
3684
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
3685
|
-
*/
|
|
3686
|
-
get protocol(): string;
|
|
3687
|
-
/**
|
|
3688
|
-
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
3689
|
-
*
|
|
3690
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
3691
|
-
*/
|
|
3692
|
-
get username(): string;
|
|
3693
|
-
/**
|
|
3694
|
-
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
3695
|
-
*
|
|
3696
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
3697
|
-
*/
|
|
3698
|
-
get password(): string;
|
|
3699
|
-
/**
|
|
3700
|
-
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
3701
|
-
*
|
|
3702
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
3703
|
-
*/
|
|
3704
|
-
get hostname(): string;
|
|
3759
|
+
export declare class MessageChannel {
|
|
3760
|
+
constructor();
|
|
3705
3761
|
/**
|
|
3706
|
-
* The **`
|
|
3762
|
+
* The **`port1`** read-only property of the MessageChannel interface returns the first port of the message channel — the port attached to the context that originated the channel.
|
|
3707
3763
|
*
|
|
3708
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3764
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1)
|
|
3709
3765
|
*/
|
|
3710
|
-
|
|
3766
|
+
readonly port1: MessagePort;
|
|
3711
3767
|
/**
|
|
3712
|
-
* The **`
|
|
3768
|
+
* The **`port2`** read-only property of the MessageChannel interface returns the second port of the message channel — the port attached to the context at the other end of the channel, which the message is initially sent to.
|
|
3713
3769
|
*
|
|
3714
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3770
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2)
|
|
3715
3771
|
*/
|
|
3716
|
-
|
|
3717
|
-
/**
|
|
3718
|
-
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
3719
|
-
*
|
|
3720
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
3721
|
-
*/
|
|
3722
|
-
get search(): string;
|
|
3723
|
-
/**
|
|
3724
|
-
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
3725
|
-
*
|
|
3726
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
3727
|
-
*/
|
|
3728
|
-
get hash(): string;
|
|
3729
|
-
/**
|
|
3730
|
-
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
3731
|
-
*
|
|
3732
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
3733
|
-
*/
|
|
3734
|
-
get hasRegExpGroups(): boolean;
|
|
3735
|
-
/**
|
|
3736
|
-
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
3737
|
-
*
|
|
3738
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
3739
|
-
*/
|
|
3740
|
-
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
3741
|
-
/**
|
|
3742
|
-
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
3743
|
-
*
|
|
3744
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
3745
|
-
*/
|
|
3746
|
-
exec(
|
|
3747
|
-
input?: string | URLPatternInit,
|
|
3748
|
-
baseURL?: string,
|
|
3749
|
-
): URLPatternResult | null;
|
|
3772
|
+
readonly port2: MessagePort;
|
|
3750
3773
|
}
|
|
3751
|
-
export interface
|
|
3752
|
-
|
|
3753
|
-
username?: string;
|
|
3754
|
-
password?: string;
|
|
3755
|
-
hostname?: string;
|
|
3756
|
-
port?: string;
|
|
3757
|
-
pathname?: string;
|
|
3758
|
-
search?: string;
|
|
3759
|
-
hash?: string;
|
|
3760
|
-
baseURL?: string;
|
|
3774
|
+
export interface MessagePortPostMessageOptions {
|
|
3775
|
+
transfer?: any[];
|
|
3761
3776
|
}
|
|
3762
|
-
export
|
|
3763
|
-
|
|
3764
|
-
|
|
3777
|
+
export type LoopbackForExport<
|
|
3778
|
+
T extends
|
|
3779
|
+
| (new (...args: any[]) => Rpc.EntrypointBranded)
|
|
3780
|
+
| ExportedHandler<any, any, any>
|
|
3781
|
+
| undefined = undefined,
|
|
3782
|
+
> = T extends new (...args: any[]) => Rpc.WorkerEntrypointBranded
|
|
3783
|
+
? LoopbackServiceStub<InstanceType<T>>
|
|
3784
|
+
: T extends new (...args: any[]) => Rpc.DurableObjectBranded
|
|
3785
|
+
? LoopbackDurableObjectClass<InstanceType<T>>
|
|
3786
|
+
: T extends new (
|
|
3787
|
+
...args: any[]
|
|
3788
|
+
) => CloudflareWorkersModule.WorkflowEntrypoint<any, infer Params>
|
|
3789
|
+
? Workflow<Params>
|
|
3790
|
+
: T extends ExportedHandler<any, any, any>
|
|
3791
|
+
? LoopbackServiceStub<undefined>
|
|
3792
|
+
: undefined;
|
|
3793
|
+
export type LoopbackServiceStub<
|
|
3794
|
+
T extends Rpc.WorkerEntrypointBranded | undefined = undefined,
|
|
3795
|
+
> = Fetcher<T> &
|
|
3796
|
+
(T extends CloudflareWorkersModule.WorkerEntrypoint<any, infer Props>
|
|
3797
|
+
? (opts: { props?: Props }) => Fetcher<T>
|
|
3798
|
+
: (opts: { props?: any }) => Fetcher<T>);
|
|
3799
|
+
export type LoopbackDurableObjectClass<
|
|
3800
|
+
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
3801
|
+
> = DurableObjectClass<T> &
|
|
3802
|
+
(T extends CloudflareWorkersModule.DurableObject<any, infer Props>
|
|
3803
|
+
? (opts: { props?: Props }) => DurableObjectClass<T>
|
|
3804
|
+
: (opts: { props?: any }) => DurableObjectClass<T>);
|
|
3805
|
+
export interface LoopbackDurableObjectNamespace extends DurableObjectNamespace {}
|
|
3806
|
+
export interface LoopbackColoLocalActorNamespace extends ColoLocalActorNamespace {}
|
|
3807
|
+
export interface SyncKvStorage {
|
|
3808
|
+
get<T = unknown>(key: string): T | undefined;
|
|
3809
|
+
list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
|
|
3810
|
+
put<T>(key: string, value: T): void;
|
|
3811
|
+
delete(key: string): boolean;
|
|
3765
3812
|
}
|
|
3766
|
-
export interface
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
pathname: URLPatternComponentResult;
|
|
3774
|
-
search: URLPatternComponentResult;
|
|
3775
|
-
hash: URLPatternComponentResult;
|
|
3813
|
+
export interface SyncKvListOptions {
|
|
3814
|
+
start?: string;
|
|
3815
|
+
startAfter?: string;
|
|
3816
|
+
end?: string;
|
|
3817
|
+
prefix?: string;
|
|
3818
|
+
reverse?: boolean;
|
|
3819
|
+
limit?: number;
|
|
3776
3820
|
}
|
|
3777
|
-
export interface
|
|
3778
|
-
|
|
3821
|
+
export interface WorkerStub {
|
|
3822
|
+
getEntrypoint<T extends Rpc.WorkerEntrypointBranded | undefined>(
|
|
3823
|
+
name?: string,
|
|
3824
|
+
options?: WorkerStubEntrypointOptions,
|
|
3825
|
+
): Fetcher<T>;
|
|
3826
|
+
getDurableObjectClass<T extends Rpc.DurableObjectBranded | undefined>(
|
|
3827
|
+
name?: string,
|
|
3828
|
+
options?: WorkerStubEntrypointOptions,
|
|
3829
|
+
): DurableObjectClass<T>;
|
|
3830
|
+
}
|
|
3831
|
+
export interface WorkerStubEntrypointOptions {
|
|
3832
|
+
props?: any;
|
|
3833
|
+
limits?: workerdResourceLimits;
|
|
3834
|
+
}
|
|
3835
|
+
export interface WorkerLoader {
|
|
3836
|
+
get(
|
|
3837
|
+
name: string | null,
|
|
3838
|
+
getCode: () => WorkerLoaderWorkerCode | Promise<WorkerLoaderWorkerCode>,
|
|
3839
|
+
): WorkerStub;
|
|
3840
|
+
load(code: WorkerLoaderWorkerCode): WorkerStub;
|
|
3841
|
+
}
|
|
3842
|
+
export interface WorkerLoaderModule {
|
|
3843
|
+
js?: string;
|
|
3844
|
+
cjs?: string;
|
|
3845
|
+
text?: string;
|
|
3846
|
+
data?: ArrayBuffer;
|
|
3847
|
+
json?: any;
|
|
3848
|
+
py?: string;
|
|
3849
|
+
wasm?: ArrayBuffer | ArrayBufferView | WebAssembly.Module;
|
|
3850
|
+
}
|
|
3851
|
+
export interface WorkerLoaderWorkerCode {
|
|
3852
|
+
compatibilityDate: string;
|
|
3853
|
+
compatibilityFlags?: string[];
|
|
3854
|
+
allowExperimental?: boolean;
|
|
3855
|
+
limits?: workerdResourceLimits;
|
|
3856
|
+
mainModule: string;
|
|
3857
|
+
modules: Record<string, string | WebAssembly.Module | WorkerLoaderModule>;
|
|
3858
|
+
env?: any;
|
|
3859
|
+
globalOutbound?: Fetcher | null;
|
|
3860
|
+
tails?: Fetcher[];
|
|
3861
|
+
streamingTails?: Fetcher[];
|
|
3862
|
+
}
|
|
3863
|
+
export interface workerdResourceLimits {
|
|
3864
|
+
cpuMs?: number;
|
|
3865
|
+
subRequests?: number;
|
|
3779
3866
|
}
|
|
3780
|
-
export type WebSocketEventMap = {
|
|
3781
|
-
close: CloseEvent;
|
|
3782
|
-
message: MessageEvent;
|
|
3783
|
-
open: Event;
|
|
3784
|
-
error: ErrorEvent;
|
|
3785
|
-
};
|
|
3786
|
-
/**
|
|
3787
|
-
* The **`WebSocket`** object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
3788
|
-
*
|
|
3789
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
3790
|
-
*/
|
|
3791
|
-
export declare var WebSocket: {
|
|
3792
|
-
prototype: WebSocket;
|
|
3793
|
-
new (url: string, protocols?: string[] | string): WebSocket;
|
|
3794
|
-
readonly READY_STATE_CONNECTING: number;
|
|
3795
|
-
readonly CONNECTING: number;
|
|
3796
|
-
readonly READY_STATE_OPEN: number;
|
|
3797
|
-
readonly OPEN: number;
|
|
3798
|
-
readonly READY_STATE_CLOSING: number;
|
|
3799
|
-
readonly CLOSING: number;
|
|
3800
|
-
readonly READY_STATE_CLOSED: number;
|
|
3801
|
-
readonly CLOSED: number;
|
|
3802
|
-
};
|
|
3803
3867
|
/**
|
|
3804
|
-
* The
|
|
3868
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
3869
|
+
* as well as timing of subrequests and other operations.
|
|
3805
3870
|
*
|
|
3806
|
-
* [
|
|
3871
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
3807
3872
|
*/
|
|
3808
|
-
export
|
|
3809
|
-
|
|
3873
|
+
export declare abstract class Performance extends EventTarget {
|
|
3874
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
3875
|
+
get timeOrigin(): number;
|
|
3876
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3877
|
+
now(): number;
|
|
3878
|
+
get eventCounts(): EventCounts;
|
|
3810
3879
|
/**
|
|
3811
|
-
* The **`
|
|
3880
|
+
* The **`clearMarks()`** method removes all or specific PerformanceMark objects from the browser's performance timeline.
|
|
3812
3881
|
*
|
|
3813
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3882
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks)
|
|
3814
3883
|
*/
|
|
3815
|
-
|
|
3884
|
+
clearMarks(name?: string): void;
|
|
3816
3885
|
/**
|
|
3817
|
-
* The **`
|
|
3886
|
+
* The **`clearMeasures()`** method removes all or specific PerformanceMeasure objects from the browser's performance timeline.
|
|
3818
3887
|
*
|
|
3819
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3888
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures)
|
|
3820
3889
|
*/
|
|
3821
|
-
|
|
3822
|
-
serializeAttachment(attachment: any): void;
|
|
3823
|
-
deserializeAttachment(): any | null;
|
|
3890
|
+
clearMeasures(name?: string): void;
|
|
3824
3891
|
/**
|
|
3825
|
-
* The **`
|
|
3892
|
+
* The **`clearResourceTimings()`** method removes all performance entries with an entryType of "resource" from the browser's performance timeline and sets the size of the performance resource data buffer to zero.
|
|
3826
3893
|
*
|
|
3827
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3894
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings)
|
|
3828
3895
|
*/
|
|
3829
|
-
|
|
3896
|
+
clearResourceTimings(): void;
|
|
3830
3897
|
/**
|
|
3831
|
-
* The **`
|
|
3898
|
+
* The **`getEntries()`** method returns an array of all PerformanceEntry objects currently present in the performance timeline.
|
|
3832
3899
|
*
|
|
3833
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3900
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries)
|
|
3834
3901
|
*/
|
|
3835
|
-
|
|
3902
|
+
getEntries(): PerformanceEntry[];
|
|
3836
3903
|
/**
|
|
3837
|
-
* The **`
|
|
3904
|
+
* The **`getEntriesByName()`** method returns an array of PerformanceEntry objects currently present in the performance timeline with the given name and type.
|
|
3838
3905
|
*
|
|
3839
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3906
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName)
|
|
3840
3907
|
*/
|
|
3841
|
-
|
|
3908
|
+
getEntriesByName(name: string, type?: string): PerformanceEntry[];
|
|
3842
3909
|
/**
|
|
3843
|
-
* The **`
|
|
3910
|
+
* The **`getEntriesByType()`** method returns an array of PerformanceEntry objects currently present in the performance timeline for a given type.
|
|
3844
3911
|
*
|
|
3845
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3912
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType)
|
|
3846
3913
|
*/
|
|
3847
|
-
|
|
3914
|
+
getEntriesByType(type: string): PerformanceEntry[];
|
|
3848
3915
|
/**
|
|
3849
|
-
* The **`
|
|
3916
|
+
* The **`mark()`** method creates a named PerformanceMark object representing a high resolution timestamp marker in the browser's performance timeline.
|
|
3850
3917
|
*
|
|
3851
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3918
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark)
|
|
3852
3919
|
*/
|
|
3853
|
-
|
|
3854
|
-
}
|
|
3855
|
-
export interface WebSocketAcceptOptions {
|
|
3920
|
+
mark(name: string, options?: PerformanceMarkOptions): PerformanceMark;
|
|
3856
3921
|
/**
|
|
3857
|
-
*
|
|
3858
|
-
*
|
|
3859
|
-
*
|
|
3860
|
-
* both sides independently. Defaults to `false` when the
|
|
3861
|
-
* `no_web_socket_half_open_by_default` compatibility flag is enabled.
|
|
3922
|
+
* The **`measure()`** method creates a named PerformanceMeasure object representing a time measurement between two marks in the browser's performance timeline.
|
|
3923
|
+
*
|
|
3924
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure)
|
|
3862
3925
|
*/
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
> {
|
|
3885
|
-
next(): IteratorResult<T, undefined>;
|
|
3886
|
-
toArray(): T[];
|
|
3887
|
-
one(): T;
|
|
3888
|
-
raw<U extends SqlStorageValue[]>(): IterableIterator<U>;
|
|
3889
|
-
columnNames: string[];
|
|
3890
|
-
get rowsRead(): number;
|
|
3891
|
-
get rowsWritten(): number;
|
|
3892
|
-
[Symbol.iterator](): IterableIterator<T>;
|
|
3893
|
-
}
|
|
3894
|
-
export interface Socket {
|
|
3895
|
-
get readable(): ReadableStream;
|
|
3896
|
-
get writable(): WritableStream;
|
|
3897
|
-
get closed(): Promise<void>;
|
|
3898
|
-
get opened(): Promise<SocketInfo>;
|
|
3899
|
-
get upgraded(): boolean;
|
|
3900
|
-
get secureTransport(): "on" | "off" | "starttls";
|
|
3901
|
-
close(): Promise<void>;
|
|
3902
|
-
startTls(options?: TlsOptions): Socket;
|
|
3926
|
+
measure(
|
|
3927
|
+
measureName: string,
|
|
3928
|
+
measureOptionsOrStartMark?: PerformanceMeasureOptions | string,
|
|
3929
|
+
maybeEndMark?: string,
|
|
3930
|
+
): PerformanceMeasure;
|
|
3931
|
+
/**
|
|
3932
|
+
* The **`setResourceTimingBufferSize()`** method sets the desired size of the browser's resource timing buffer which stores the "resource" performance entries.
|
|
3933
|
+
*
|
|
3934
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize)
|
|
3935
|
+
*/
|
|
3936
|
+
setResourceTimingBufferSize(size: number): void;
|
|
3937
|
+
/**
|
|
3938
|
+
* The **`toJSON()`** method of the Performance interface is a serializer; it returns a JSON representation of the Performance object.
|
|
3939
|
+
*
|
|
3940
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3941
|
+
*/
|
|
3942
|
+
toJSON(): object;
|
|
3943
|
+
get nodeTiming(): PerformanceNodeTiming;
|
|
3944
|
+
eventLoopUtilization(): PerformanceEventLoopUtilization;
|
|
3945
|
+
markResourceTiming(): void;
|
|
3946
|
+
timerify(fn: () => void): () => void;
|
|
3903
3947
|
}
|
|
3904
|
-
export interface
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3948
|
+
export interface PerformanceEventLoopUtilization {
|
|
3949
|
+
idle: number;
|
|
3950
|
+
active: number;
|
|
3951
|
+
utilization: number;
|
|
3908
3952
|
}
|
|
3909
|
-
export interface
|
|
3910
|
-
|
|
3911
|
-
|
|
3953
|
+
export interface PerformanceNodeTiming extends PerformanceEntry {
|
|
3954
|
+
readonly nodeStart: number;
|
|
3955
|
+
readonly v8Start: number;
|
|
3956
|
+
readonly bootstrapComplete: number;
|
|
3957
|
+
readonly environment: number;
|
|
3958
|
+
readonly loopStart: number;
|
|
3959
|
+
readonly loopExit: number;
|
|
3960
|
+
readonly idleTime: number;
|
|
3961
|
+
readonly uvMetricsInfo: UvMetricsInfo;
|
|
3962
|
+
toJSON(): object;
|
|
3912
3963
|
}
|
|
3913
|
-
export interface
|
|
3914
|
-
|
|
3964
|
+
export interface UvMetricsInfo {
|
|
3965
|
+
loopCount: number;
|
|
3966
|
+
events: number;
|
|
3967
|
+
eventsWaiting: number;
|
|
3915
3968
|
}
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3969
|
+
/**
|
|
3970
|
+
* **`PerformanceMark`** is an interface for PerformanceEntry objects with an entryType of "mark".
|
|
3971
|
+
*
|
|
3972
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
3973
|
+
*/
|
|
3974
|
+
export declare class PerformanceMark extends PerformanceEntry {
|
|
3975
|
+
constructor(name: string, maybeOptions?: PerformanceMarkOptions);
|
|
3976
|
+
/**
|
|
3977
|
+
* The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (either when using performance.mark() or the PerformanceMark() constructor).
|
|
3978
|
+
*
|
|
3979
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
|
|
3980
|
+
*/
|
|
3981
|
+
get detail(): any;
|
|
3982
|
+
toJSON(): object;
|
|
3919
3983
|
}
|
|
3920
3984
|
/**
|
|
3921
|
-
*
|
|
3985
|
+
* **`PerformanceMeasure`** is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline.
|
|
3922
3986
|
*
|
|
3923
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3987
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
3924
3988
|
*/
|
|
3925
|
-
export declare class
|
|
3926
|
-
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3989
|
+
export declare abstract class PerformanceMeasure extends PerformanceEntry {
|
|
3927
3990
|
/**
|
|
3928
|
-
* The **`
|
|
3991
|
+
* The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (when using performance.measure().
|
|
3929
3992
|
*
|
|
3930
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
3993
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
|
|
3931
3994
|
*/
|
|
3932
|
-
|
|
3995
|
+
get detail(): any;
|
|
3996
|
+
toJSON(): object;
|
|
3997
|
+
}
|
|
3998
|
+
export interface PerformanceMarkOptions {
|
|
3999
|
+
detail?: any;
|
|
4000
|
+
startTime?: number;
|
|
4001
|
+
}
|
|
4002
|
+
export interface PerformanceMeasureOptions {
|
|
4003
|
+
detail?: any;
|
|
4004
|
+
start?: number;
|
|
4005
|
+
duration?: number;
|
|
4006
|
+
end?: number;
|
|
4007
|
+
}
|
|
4008
|
+
/**
|
|
4009
|
+
* The **`PerformanceObserverEntryList`** interface is a list of performance events that were explicitly observed via the observe() method.
|
|
4010
|
+
*
|
|
4011
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList)
|
|
4012
|
+
*/
|
|
4013
|
+
export declare abstract class PerformanceObserverEntryList {
|
|
3933
4014
|
/**
|
|
3934
|
-
* The **`
|
|
4015
|
+
* The **`getEntries()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed performance entry objects. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
3935
4016
|
*
|
|
3936
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4017
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries)
|
|
3937
4018
|
*/
|
|
3938
|
-
|
|
4019
|
+
getEntries(): PerformanceEntry[];
|
|
3939
4020
|
/**
|
|
3940
|
-
* The **`
|
|
4021
|
+
* The **`getEntriesByType()`** method of the PerformanceObserverEntryList returns a list of explicitly observed performance entry objects for a given performance entry type. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
3941
4022
|
*
|
|
3942
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4023
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType)
|
|
3943
4024
|
*/
|
|
3944
|
-
|
|
4025
|
+
getEntriesByType(type: string): PerformanceEntry[];
|
|
3945
4026
|
/**
|
|
3946
|
-
* The **`
|
|
4027
|
+
* The **`getEntriesByName()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed PerformanceEntry objects for a given name and entryType. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
3947
4028
|
*
|
|
3948
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4029
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName)
|
|
3949
4030
|
*/
|
|
3950
|
-
|
|
3951
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3952
|
-
get onopen(): any | null;
|
|
3953
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3954
|
-
set onopen(value: any | null);
|
|
3955
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3956
|
-
get onmessage(): any | null;
|
|
3957
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3958
|
-
set onmessage(value: any | null);
|
|
3959
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3960
|
-
get onerror(): any | null;
|
|
3961
|
-
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3962
|
-
set onerror(value: any | null);
|
|
3963
|
-
static readonly CONNECTING: number;
|
|
3964
|
-
static readonly OPEN: number;
|
|
3965
|
-
static readonly CLOSED: number;
|
|
3966
|
-
static from(stream: ReadableStream): EventSource;
|
|
3967
|
-
}
|
|
3968
|
-
export interface EventSourceEventSourceInit {
|
|
3969
|
-
withCredentials?: boolean;
|
|
3970
|
-
fetcher?: Fetcher;
|
|
3971
|
-
}
|
|
3972
|
-
export interface ExecOutput {
|
|
3973
|
-
readonly stdout: ArrayBuffer;
|
|
3974
|
-
readonly stderr: ArrayBuffer;
|
|
3975
|
-
readonly exitCode: number;
|
|
3976
|
-
}
|
|
3977
|
-
export interface ContainerExecOptions {
|
|
3978
|
-
cwd?: string;
|
|
3979
|
-
env?: Record<string, string>;
|
|
3980
|
-
user?: string;
|
|
3981
|
-
signal?: AbortSignal;
|
|
3982
|
-
pty?: boolean | ContainerExecPtyOptions;
|
|
3983
|
-
stdin?: ReadableStream | "pipe";
|
|
3984
|
-
stdout?: "pipe" | "ignore";
|
|
3985
|
-
stderr?: "pipe" | "ignore" | "combined";
|
|
3986
|
-
}
|
|
3987
|
-
export interface ContainerExecPtyOptions {
|
|
3988
|
-
cols?: number;
|
|
3989
|
-
rows?: number;
|
|
3990
|
-
}
|
|
3991
|
-
export interface ExecProcess {
|
|
3992
|
-
readonly stdin: WritableStream | null;
|
|
3993
|
-
readonly stdout: ReadableStream | null;
|
|
3994
|
-
readonly stderr: ReadableStream | null;
|
|
3995
|
-
readonly pid: number;
|
|
3996
|
-
readonly isPty: boolean;
|
|
3997
|
-
readonly exitCode: Promise<number>;
|
|
3998
|
-
output(): Promise<ExecOutput>;
|
|
3999
|
-
kill(signal?: number): void;
|
|
4000
|
-
resize(cols: number, rows: number): void;
|
|
4001
|
-
}
|
|
4002
|
-
export interface Container {
|
|
4003
|
-
get running(): boolean;
|
|
4004
|
-
get images(): Record<string, string>;
|
|
4005
|
-
start(options?: ContainerStartupOptions): void;
|
|
4006
|
-
monitor(): Promise<void>;
|
|
4007
|
-
destroy(error?: any): Promise<void>;
|
|
4008
|
-
signal(signo: number): void;
|
|
4009
|
-
getTcpPort(port: number): Fetcher;
|
|
4010
|
-
setInactivityTimeout(durationMs: number | bigint): Promise<void>;
|
|
4011
|
-
interceptOutboundHttp(addr: string, binding: Fetcher): Promise<void>;
|
|
4012
|
-
interceptAllOutboundHttp(binding: Fetcher): Promise<void>;
|
|
4013
|
-
snapshotContainer(
|
|
4014
|
-
options?: ContainerSnapshotOptions,
|
|
4015
|
-
): Promise<ContainerSnapshot>;
|
|
4016
|
-
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
4017
|
-
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
4018
|
-
inspect(): Promise<ContainerInfo | null>;
|
|
4031
|
+
getEntriesByName(name: string, type?: string): PerformanceEntry[];
|
|
4019
4032
|
}
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
| "standard-4"
|
|
4057
|
-
| ContainerStartResources;
|
|
4058
|
-
labels?: Record<string, string>;
|
|
4059
|
-
directorySnapshots?: ContainerDirectorySnapshotRestoreParams[];
|
|
4060
|
-
} & (
|
|
4061
|
-
| {
|
|
4062
|
-
image: string;
|
|
4063
|
-
containerSnapshot?: never;
|
|
4064
|
-
}
|
|
4065
|
-
| {
|
|
4066
|
-
image?: never;
|
|
4067
|
-
containerSnapshot?: ContainerSnapshotRestoreParams;
|
|
4068
|
-
}
|
|
4069
|
-
);
|
|
4070
|
-
export interface ContainerInfo {
|
|
4071
|
-
labels: Record<string, string>;
|
|
4072
|
-
image: string;
|
|
4073
|
-
}
|
|
4074
|
-
export interface ContainerStartResources {
|
|
4075
|
-
vcpu: number;
|
|
4076
|
-
memoryMib: number;
|
|
4077
|
-
diskMb: number;
|
|
4033
|
+
/**
|
|
4034
|
+
* The **`PerformanceEntry`** object encapsulates a single performance metric that is part of the browser's performance timeline.
|
|
4035
|
+
*
|
|
4036
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
4037
|
+
*/
|
|
4038
|
+
export declare abstract class PerformanceEntry {
|
|
4039
|
+
/**
|
|
4040
|
+
* The read-only **`name`** property of the PerformanceEntry interface is a string representing the name for a performance entry. It acts as an identifier, but it does not have to be unique. The value depends on the subclass.
|
|
4041
|
+
*
|
|
4042
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name)
|
|
4043
|
+
*/
|
|
4044
|
+
get name(): string;
|
|
4045
|
+
/**
|
|
4046
|
+
* The read-only **`entryType`** property returns a string representing the type of performance metric that this entry represents.
|
|
4047
|
+
*
|
|
4048
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType)
|
|
4049
|
+
*/
|
|
4050
|
+
get entryType(): string;
|
|
4051
|
+
/**
|
|
4052
|
+
* The read-only **`startTime`** property returns the first timestamp recorded for this PerformanceEntry. The meaning of this property depends on the value of this entry's entryType.
|
|
4053
|
+
*
|
|
4054
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime)
|
|
4055
|
+
*/
|
|
4056
|
+
get startTime(): number;
|
|
4057
|
+
/**
|
|
4058
|
+
* The read-only **`duration`** property returns a timestamp that is the duration of the performance entry. The meaning of this property depends on the value of this entry's entryType.
|
|
4059
|
+
*
|
|
4060
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration)
|
|
4061
|
+
*/
|
|
4062
|
+
get duration(): number;
|
|
4063
|
+
/**
|
|
4064
|
+
* The **`toJSON()`** method is a serializer; it returns a JSON representation of the PerformanceEntry object.
|
|
4065
|
+
*
|
|
4066
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
|
|
4067
|
+
*/
|
|
4068
|
+
toJSON(): object;
|
|
4078
4069
|
}
|
|
4079
4070
|
/**
|
|
4080
|
-
* The **`
|
|
4071
|
+
* The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script.
|
|
4081
4072
|
*
|
|
4082
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4073
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
|
|
4083
4074
|
*/
|
|
4084
|
-
export declare abstract class
|
|
4075
|
+
export declare abstract class PerformanceResourceTiming extends PerformanceEntry {
|
|
4085
4076
|
/**
|
|
4086
|
-
* The **`
|
|
4077
|
+
* The **`connectEnd`** read-only property returns the timestamp immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as TLS handshake and SOCKS authentication.
|
|
4087
4078
|
*
|
|
4088
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4079
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd)
|
|
4089
4080
|
*/
|
|
4090
|
-
|
|
4091
|
-
data?: any,
|
|
4092
|
-
options?: any[] | MessagePortPostMessageOptions,
|
|
4093
|
-
): void;
|
|
4081
|
+
get connectEnd(): number;
|
|
4094
4082
|
/**
|
|
4095
|
-
* The **`
|
|
4083
|
+
* The **`connectStart`** read-only property returns the timestamp immediately before the user agent starts establishing the connection to the server to retrieve the resource.
|
|
4096
4084
|
*
|
|
4097
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4085
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart)
|
|
4098
4086
|
*/
|
|
4099
|
-
|
|
4087
|
+
get connectStart(): number;
|
|
4100
4088
|
/**
|
|
4101
|
-
* The **`
|
|
4089
|
+
* The **`decodedBodySize`** read-only property returns the size (in octets) received from the fetch (HTTP or cache) of the message body after removing any applied content encoding (like gzip or Brotli). If the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content encoding.
|
|
4102
4090
|
*
|
|
4103
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4091
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
|
|
4104
4092
|
*/
|
|
4105
|
-
|
|
4106
|
-
get onmessage(): any | null;
|
|
4107
|
-
set onmessage(value: any | null);
|
|
4108
|
-
}
|
|
4109
|
-
/**
|
|
4110
|
-
* The **`MessageChannel`** interface of the Channel Messaging API allows us to create a new message channel and send data through it via its two MessagePort properties.
|
|
4111
|
-
*
|
|
4112
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel)
|
|
4113
|
-
*/
|
|
4114
|
-
export declare class MessageChannel {
|
|
4115
|
-
constructor();
|
|
4093
|
+
get decodedBodySize(): number;
|
|
4116
4094
|
/**
|
|
4117
|
-
* The **`
|
|
4095
|
+
* The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
|
|
4118
4096
|
*
|
|
4119
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4097
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd)
|
|
4120
4098
|
*/
|
|
4121
|
-
|
|
4099
|
+
get domainLookupEnd(): number;
|
|
4122
4100
|
/**
|
|
4123
|
-
* The **`
|
|
4101
|
+
* The **`domainLookupStart`** read-only property returns the timestamp immediately before the browser starts the domain name lookup for the resource.
|
|
4124
4102
|
*
|
|
4125
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4103
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart)
|
|
4126
4104
|
*/
|
|
4127
|
-
|
|
4128
|
-
}
|
|
4129
|
-
export interface MessagePortPostMessageOptions {
|
|
4130
|
-
transfer?: any[];
|
|
4131
|
-
}
|
|
4132
|
-
export type LoopbackForExport<
|
|
4133
|
-
T extends
|
|
4134
|
-
| (new (...args: any[]) => Rpc.EntrypointBranded)
|
|
4135
|
-
| ExportedHandler<any, any, any>
|
|
4136
|
-
| undefined = undefined,
|
|
4137
|
-
> = T extends new (...args: any[]) => Rpc.WorkerEntrypointBranded
|
|
4138
|
-
? LoopbackServiceStub<InstanceType<T>>
|
|
4139
|
-
: T extends new (...args: any[]) => Rpc.DurableObjectBranded
|
|
4140
|
-
? LoopbackDurableObjectClass<InstanceType<T>>
|
|
4141
|
-
: T extends new (
|
|
4142
|
-
...args: any[]
|
|
4143
|
-
) => CloudflareWorkersModule.WorkflowEntrypoint<any, infer Params>
|
|
4144
|
-
? Workflow<Params>
|
|
4145
|
-
: T extends ExportedHandler<any, any, any>
|
|
4146
|
-
? LoopbackServiceStub<undefined>
|
|
4147
|
-
: undefined;
|
|
4148
|
-
export type LoopbackServiceStub<
|
|
4149
|
-
T extends Rpc.WorkerEntrypointBranded | undefined = undefined,
|
|
4150
|
-
> = Fetcher<T> &
|
|
4151
|
-
(T extends CloudflareWorkersModule.WorkerEntrypoint<any, infer Props>
|
|
4152
|
-
? (opts: { props?: Props }) => Fetcher<T>
|
|
4153
|
-
: (opts: { props?: any }) => Fetcher<T>);
|
|
4154
|
-
export type LoopbackDurableObjectClass<
|
|
4155
|
-
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
4156
|
-
> = DurableObjectClass<T> &
|
|
4157
|
-
(T extends CloudflareWorkersModule.DurableObject<any, infer Props>
|
|
4158
|
-
? (opts: { props?: Props }) => DurableObjectClass<T>
|
|
4159
|
-
: (opts: { props?: any }) => DurableObjectClass<T>);
|
|
4160
|
-
export interface LoopbackDurableObjectNamespace extends DurableObjectNamespace {}
|
|
4161
|
-
export interface LoopbackColoLocalActorNamespace extends ColoLocalActorNamespace {}
|
|
4162
|
-
export interface SyncKvStorage {
|
|
4163
|
-
get<T = unknown>(key: string): T | undefined;
|
|
4164
|
-
list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
|
|
4165
|
-
put<T>(key: string, value: T): void;
|
|
4166
|
-
delete(key: string): boolean;
|
|
4167
|
-
}
|
|
4168
|
-
export interface SyncKvListOptions {
|
|
4169
|
-
start?: string;
|
|
4170
|
-
startAfter?: string;
|
|
4171
|
-
end?: string;
|
|
4172
|
-
prefix?: string;
|
|
4173
|
-
reverse?: boolean;
|
|
4174
|
-
limit?: number;
|
|
4175
|
-
}
|
|
4176
|
-
export interface WorkerStub {
|
|
4177
|
-
getEntrypoint<T extends Rpc.WorkerEntrypointBranded | undefined>(
|
|
4178
|
-
name?: string,
|
|
4179
|
-
options?: WorkerStubEntrypointOptions,
|
|
4180
|
-
): Fetcher<T>;
|
|
4181
|
-
getDurableObjectClass<T extends Rpc.DurableObjectBranded | undefined>(
|
|
4182
|
-
name?: string,
|
|
4183
|
-
options?: WorkerStubEntrypointOptions,
|
|
4184
|
-
): DurableObjectClass<T>;
|
|
4185
|
-
}
|
|
4186
|
-
export interface WorkerStubEntrypointOptions {
|
|
4187
|
-
props?: any;
|
|
4188
|
-
limits?: workerdResourceLimits;
|
|
4189
|
-
}
|
|
4190
|
-
export interface WorkerLoader {
|
|
4191
|
-
get(
|
|
4192
|
-
name: string | null,
|
|
4193
|
-
getCode: () => WorkerLoaderWorkerCode | Promise<WorkerLoaderWorkerCode>,
|
|
4194
|
-
): WorkerStub;
|
|
4195
|
-
load(code: WorkerLoaderWorkerCode): WorkerStub;
|
|
4196
|
-
}
|
|
4197
|
-
export interface WorkerLoaderModule {
|
|
4198
|
-
js?: string;
|
|
4199
|
-
cjs?: string;
|
|
4200
|
-
text?: string;
|
|
4201
|
-
data?: ArrayBuffer;
|
|
4202
|
-
json?: any;
|
|
4203
|
-
py?: string;
|
|
4204
|
-
wasm?: ArrayBuffer | ArrayBufferView | WebAssembly.Module;
|
|
4205
|
-
}
|
|
4206
|
-
export interface WorkerLoaderWorkerCode {
|
|
4207
|
-
compatibilityDate: string;
|
|
4208
|
-
compatibilityFlags?: string[];
|
|
4209
|
-
allowExperimental?: boolean;
|
|
4210
|
-
limits?: workerdResourceLimits;
|
|
4211
|
-
mainModule: string;
|
|
4212
|
-
modules: Record<string, string | WebAssembly.Module | WorkerLoaderModule>;
|
|
4213
|
-
env?: any;
|
|
4214
|
-
globalOutbound?: Fetcher | null;
|
|
4215
|
-
tails?: Fetcher[];
|
|
4216
|
-
streamingTails?: Fetcher[];
|
|
4217
|
-
}
|
|
4218
|
-
export interface workerdResourceLimits {
|
|
4219
|
-
cpuMs?: number;
|
|
4220
|
-
subRequests?: number;
|
|
4221
|
-
}
|
|
4222
|
-
/**
|
|
4223
|
-
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
4224
|
-
* as well as timing of subrequests and other operations.
|
|
4225
|
-
*
|
|
4226
|
-
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
4227
|
-
*/
|
|
4228
|
-
export declare abstract class Performance extends EventTarget {
|
|
4229
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
4230
|
-
get timeOrigin(): number;
|
|
4231
|
-
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
4232
|
-
now(): number;
|
|
4233
|
-
get eventCounts(): EventCounts;
|
|
4105
|
+
get domainLookupStart(): number;
|
|
4234
4106
|
/**
|
|
4235
|
-
* The **`
|
|
4107
|
+
* The **`encodedBodySize`** read-only property represents the size (in octets) received from the fetch (HTTP or cache) of the payload body before removing any applied content encodings (like gzip or Brotli). If the resource is retrieved from an application cache or a local resource, it must return the size of the payload body before removing any applied content encoding.
|
|
4236
4108
|
*
|
|
4237
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4109
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize)
|
|
4238
4110
|
*/
|
|
4239
|
-
|
|
4111
|
+
get encodedBodySize(): number;
|
|
4240
4112
|
/**
|
|
4241
|
-
* The **`
|
|
4113
|
+
* The **`fetchStart`** read-only property represents a timestamp immediately before the browser starts to fetch the resource.
|
|
4242
4114
|
*
|
|
4243
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4115
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
|
|
4244
4116
|
*/
|
|
4245
|
-
|
|
4117
|
+
get fetchStart(): number;
|
|
4246
4118
|
/**
|
|
4247
|
-
* The **`
|
|
4119
|
+
* The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
|
|
4248
4120
|
*
|
|
4249
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4121
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType)
|
|
4250
4122
|
*/
|
|
4251
|
-
|
|
4123
|
+
get initiatorType(): string;
|
|
4252
4124
|
/**
|
|
4253
|
-
* The **`
|
|
4125
|
+
* The **`nextHopProtocol`** read-only property is a string representing the network protocol used to fetch the resource, as identified by the ALPN Protocol ID (RFC7301).
|
|
4254
4126
|
*
|
|
4255
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4127
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol)
|
|
4256
4128
|
*/
|
|
4257
|
-
|
|
4129
|
+
get nextHopProtocol(): string;
|
|
4258
4130
|
/**
|
|
4259
|
-
* The **`
|
|
4131
|
+
* The **`redirectEnd`** read-only property returns a timestamp immediately after receiving the last byte of the response of the last redirect.
|
|
4260
4132
|
*
|
|
4261
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4133
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd)
|
|
4262
4134
|
*/
|
|
4263
|
-
|
|
4135
|
+
get redirectEnd(): number;
|
|
4264
4136
|
/**
|
|
4265
|
-
* The **`
|
|
4137
|
+
* The **`redirectStart`** read-only property returns a timestamp representing the start time of the fetch which that initiates the redirect.
|
|
4266
4138
|
*
|
|
4267
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4139
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart)
|
|
4268
4140
|
*/
|
|
4269
|
-
|
|
4141
|
+
get redirectStart(): number;
|
|
4270
4142
|
/**
|
|
4271
|
-
* The **`
|
|
4143
|
+
* The **`requestStart`** read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retries the request, the value returned will be the start of the retry request.
|
|
4272
4144
|
*
|
|
4273
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4145
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart)
|
|
4274
4146
|
*/
|
|
4275
|
-
|
|
4147
|
+
get requestStart(): number;
|
|
4276
4148
|
/**
|
|
4277
|
-
* The **`
|
|
4149
|
+
* The **`responseEnd`** read-only property returns a timestamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
|
|
4278
4150
|
*
|
|
4279
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4151
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd)
|
|
4280
4152
|
*/
|
|
4281
|
-
|
|
4282
|
-
measureName: string,
|
|
4283
|
-
measureOptionsOrStartMark?: PerformanceMeasureOptions | string,
|
|
4284
|
-
maybeEndMark?: string,
|
|
4285
|
-
): PerformanceMeasure;
|
|
4153
|
+
get responseEnd(): number;
|
|
4286
4154
|
/**
|
|
4287
|
-
* The **`
|
|
4155
|
+
* The **`responseStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
|
|
4288
4156
|
*
|
|
4289
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/
|
|
4157
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart)
|
|
4290
4158
|
*/
|
|
4291
|
-
|
|
4292
|
-
/**
|
|
4293
|
-
* The **`toJSON()`** method of the Performance interface is a serializer; it returns a JSON representation of the Performance object.
|
|
4294
|
-
*
|
|
4295
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
4296
|
-
*/
|
|
4297
|
-
toJSON(): object;
|
|
4298
|
-
get nodeTiming(): PerformanceNodeTiming;
|
|
4299
|
-
eventLoopUtilization(): PerformanceEventLoopUtilization;
|
|
4300
|
-
markResourceTiming(): void;
|
|
4301
|
-
timerify(fn: () => void): () => void;
|
|
4302
|
-
}
|
|
4303
|
-
export interface PerformanceEventLoopUtilization {
|
|
4304
|
-
idle: number;
|
|
4305
|
-
active: number;
|
|
4306
|
-
utilization: number;
|
|
4307
|
-
}
|
|
4308
|
-
export interface PerformanceNodeTiming extends PerformanceEntry {
|
|
4309
|
-
readonly nodeStart: number;
|
|
4310
|
-
readonly v8Start: number;
|
|
4311
|
-
readonly bootstrapComplete: number;
|
|
4312
|
-
readonly environment: number;
|
|
4313
|
-
readonly loopStart: number;
|
|
4314
|
-
readonly loopExit: number;
|
|
4315
|
-
readonly idleTime: number;
|
|
4316
|
-
readonly uvMetricsInfo: UvMetricsInfo;
|
|
4317
|
-
toJSON(): object;
|
|
4318
|
-
}
|
|
4319
|
-
export interface UvMetricsInfo {
|
|
4320
|
-
loopCount: number;
|
|
4321
|
-
events: number;
|
|
4322
|
-
eventsWaiting: number;
|
|
4323
|
-
}
|
|
4324
|
-
/**
|
|
4325
|
-
* **`PerformanceMark`** is an interface for PerformanceEntry objects with an entryType of "mark".
|
|
4326
|
-
*
|
|
4327
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark)
|
|
4328
|
-
*/
|
|
4329
|
-
export declare class PerformanceMark extends PerformanceEntry {
|
|
4330
|
-
constructor(name: string, maybeOptions?: PerformanceMarkOptions);
|
|
4331
|
-
/**
|
|
4332
|
-
* The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (either when using performance.mark() or the PerformanceMark() constructor).
|
|
4333
|
-
*
|
|
4334
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
|
|
4335
|
-
*/
|
|
4336
|
-
get detail(): any;
|
|
4337
|
-
toJSON(): object;
|
|
4338
|
-
}
|
|
4339
|
-
/**
|
|
4340
|
-
* **`PerformanceMeasure`** is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline.
|
|
4341
|
-
*
|
|
4342
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure)
|
|
4343
|
-
*/
|
|
4344
|
-
export declare abstract class PerformanceMeasure extends PerformanceEntry {
|
|
4345
|
-
/**
|
|
4346
|
-
* The read-only **`detail`** property returns arbitrary metadata that was included in the mark upon construction (when using performance.measure().
|
|
4347
|
-
*
|
|
4348
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
|
|
4349
|
-
*/
|
|
4350
|
-
get detail(): any;
|
|
4351
|
-
toJSON(): object;
|
|
4352
|
-
}
|
|
4353
|
-
export interface PerformanceMarkOptions {
|
|
4354
|
-
detail?: any;
|
|
4355
|
-
startTime?: number;
|
|
4356
|
-
}
|
|
4357
|
-
export interface PerformanceMeasureOptions {
|
|
4358
|
-
detail?: any;
|
|
4359
|
-
start?: number;
|
|
4360
|
-
duration?: number;
|
|
4361
|
-
end?: number;
|
|
4362
|
-
}
|
|
4363
|
-
/**
|
|
4364
|
-
* The **`PerformanceObserverEntryList`** interface is a list of performance events that were explicitly observed via the observe() method.
|
|
4365
|
-
*
|
|
4366
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList)
|
|
4367
|
-
*/
|
|
4368
|
-
export declare abstract class PerformanceObserverEntryList {
|
|
4369
|
-
/**
|
|
4370
|
-
* The **`getEntries()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed performance entry objects. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
4371
|
-
*
|
|
4372
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries)
|
|
4373
|
-
*/
|
|
4374
|
-
getEntries(): PerformanceEntry[];
|
|
4375
|
-
/**
|
|
4376
|
-
* The **`getEntriesByType()`** method of the PerformanceObserverEntryList returns a list of explicitly observed performance entry objects for a given performance entry type. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
4377
|
-
*
|
|
4378
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType)
|
|
4379
|
-
*/
|
|
4380
|
-
getEntriesByType(type: string): PerformanceEntry[];
|
|
4381
|
-
/**
|
|
4382
|
-
* The **`getEntriesByName()`** method of the PerformanceObserverEntryList interface returns a list of explicitly observed PerformanceEntry objects for a given name and entryType. The list's members are determined by the set of entry types specified in the call to the observe() method. The list is available in the observer's callback function (as the first parameter in the callback).
|
|
4383
|
-
*
|
|
4384
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName)
|
|
4385
|
-
*/
|
|
4386
|
-
getEntriesByName(name: string, type?: string): PerformanceEntry[];
|
|
4387
|
-
}
|
|
4388
|
-
/**
|
|
4389
|
-
* The **`PerformanceEntry`** object encapsulates a single performance metric that is part of the browser's performance timeline.
|
|
4390
|
-
*
|
|
4391
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry)
|
|
4392
|
-
*/
|
|
4393
|
-
export declare abstract class PerformanceEntry {
|
|
4394
|
-
/**
|
|
4395
|
-
* The read-only **`name`** property of the PerformanceEntry interface is a string representing the name for a performance entry. It acts as an identifier, but it does not have to be unique. The value depends on the subclass.
|
|
4396
|
-
*
|
|
4397
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name)
|
|
4398
|
-
*/
|
|
4399
|
-
get name(): string;
|
|
4400
|
-
/**
|
|
4401
|
-
* The read-only **`entryType`** property returns a string representing the type of performance metric that this entry represents.
|
|
4402
|
-
*
|
|
4403
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType)
|
|
4404
|
-
*/
|
|
4405
|
-
get entryType(): string;
|
|
4406
|
-
/**
|
|
4407
|
-
* The read-only **`startTime`** property returns the first timestamp recorded for this PerformanceEntry. The meaning of this property depends on the value of this entry's entryType.
|
|
4408
|
-
*
|
|
4409
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime)
|
|
4410
|
-
*/
|
|
4411
|
-
get startTime(): number;
|
|
4412
|
-
/**
|
|
4413
|
-
* The read-only **`duration`** property returns a timestamp that is the duration of the performance entry. The meaning of this property depends on the value of this entry's entryType.
|
|
4414
|
-
*
|
|
4415
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration)
|
|
4416
|
-
*/
|
|
4417
|
-
get duration(): number;
|
|
4418
|
-
/**
|
|
4419
|
-
* The **`toJSON()`** method is a serializer; it returns a JSON representation of the PerformanceEntry object.
|
|
4420
|
-
*
|
|
4421
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
|
|
4422
|
-
*/
|
|
4423
|
-
toJSON(): object;
|
|
4424
|
-
}
|
|
4425
|
-
/**
|
|
4426
|
-
* The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script.
|
|
4427
|
-
*
|
|
4428
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
|
|
4429
|
-
*/
|
|
4430
|
-
export declare abstract class PerformanceResourceTiming extends PerformanceEntry {
|
|
4431
|
-
/**
|
|
4432
|
-
* The **`connectEnd`** read-only property returns the timestamp immediately after the browser finishes establishing the connection to the server to retrieve the resource. The timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as TLS handshake and SOCKS authentication.
|
|
4433
|
-
*
|
|
4434
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd)
|
|
4435
|
-
*/
|
|
4436
|
-
get connectEnd(): number;
|
|
4437
|
-
/**
|
|
4438
|
-
* The **`connectStart`** read-only property returns the timestamp immediately before the user agent starts establishing the connection to the server to retrieve the resource.
|
|
4439
|
-
*
|
|
4440
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart)
|
|
4441
|
-
*/
|
|
4442
|
-
get connectStart(): number;
|
|
4443
|
-
/**
|
|
4444
|
-
* The **`decodedBodySize`** read-only property returns the size (in octets) received from the fetch (HTTP or cache) of the message body after removing any applied content encoding (like gzip or Brotli). If the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content encoding.
|
|
4445
|
-
*
|
|
4446
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
|
|
4447
|
-
*/
|
|
4448
|
-
get decodedBodySize(): number;
|
|
4449
|
-
/**
|
|
4450
|
-
* The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
|
|
4451
|
-
*
|
|
4452
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd)
|
|
4453
|
-
*/
|
|
4454
|
-
get domainLookupEnd(): number;
|
|
4455
|
-
/**
|
|
4456
|
-
* The **`domainLookupStart`** read-only property returns the timestamp immediately before the browser starts the domain name lookup for the resource.
|
|
4457
|
-
*
|
|
4458
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart)
|
|
4459
|
-
*/
|
|
4460
|
-
get domainLookupStart(): number;
|
|
4461
|
-
/**
|
|
4462
|
-
* The **`encodedBodySize`** read-only property represents the size (in octets) received from the fetch (HTTP or cache) of the payload body before removing any applied content encodings (like gzip or Brotli). If the resource is retrieved from an application cache or a local resource, it must return the size of the payload body before removing any applied content encoding.
|
|
4463
|
-
*
|
|
4464
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize)
|
|
4465
|
-
*/
|
|
4466
|
-
get encodedBodySize(): number;
|
|
4467
|
-
/**
|
|
4468
|
-
* The **`fetchStart`** read-only property represents a timestamp immediately before the browser starts to fetch the resource.
|
|
4469
|
-
*
|
|
4470
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
|
|
4471
|
-
*/
|
|
4472
|
-
get fetchStart(): number;
|
|
4473
|
-
/**
|
|
4474
|
-
* The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
|
|
4475
|
-
*
|
|
4476
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType)
|
|
4477
|
-
*/
|
|
4478
|
-
get initiatorType(): string;
|
|
4479
|
-
/**
|
|
4480
|
-
* The **`nextHopProtocol`** read-only property is a string representing the network protocol used to fetch the resource, as identified by the ALPN Protocol ID (RFC7301).
|
|
4481
|
-
*
|
|
4482
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol)
|
|
4483
|
-
*/
|
|
4484
|
-
get nextHopProtocol(): string;
|
|
4485
|
-
/**
|
|
4486
|
-
* The **`redirectEnd`** read-only property returns a timestamp immediately after receiving the last byte of the response of the last redirect.
|
|
4487
|
-
*
|
|
4488
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd)
|
|
4489
|
-
*/
|
|
4490
|
-
get redirectEnd(): number;
|
|
4491
|
-
/**
|
|
4492
|
-
* The **`redirectStart`** read-only property returns a timestamp representing the start time of the fetch which that initiates the redirect.
|
|
4493
|
-
*
|
|
4494
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart)
|
|
4495
|
-
*/
|
|
4496
|
-
get redirectStart(): number;
|
|
4497
|
-
/**
|
|
4498
|
-
* The **`requestStart`** read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource. If the transport connection fails and the browser retries the request, the value returned will be the start of the retry request.
|
|
4499
|
-
*
|
|
4500
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart)
|
|
4501
|
-
*/
|
|
4502
|
-
get requestStart(): number;
|
|
4503
|
-
/**
|
|
4504
|
-
* The **`responseEnd`** read-only property returns a timestamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
|
|
4505
|
-
*
|
|
4506
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd)
|
|
4507
|
-
*/
|
|
4508
|
-
get responseEnd(): number;
|
|
4509
|
-
/**
|
|
4510
|
-
* The **`responseStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
|
|
4511
|
-
*
|
|
4512
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart)
|
|
4513
|
-
*/
|
|
4514
|
-
get responseStart(): number;
|
|
4159
|
+
get responseStart(): number;
|
|
4515
4160
|
/**
|
|
4516
4161
|
* The **`responseStatus`** read-only property represents the HTTP response status code returned when fetching the resource.
|
|
4517
4162
|
*
|
|
@@ -15151,6 +14796,10 @@ export interface ForwardableEmailMessage extends EmailMessage {
|
|
|
15151
14796
|
* Size of the email message content.
|
|
15152
14797
|
*/
|
|
15153
14798
|
readonly rawSize: number;
|
|
14799
|
+
/**
|
|
14800
|
+
* Whether this email message can be forwarded with `forward()`.
|
|
14801
|
+
*/
|
|
14802
|
+
readonly canBeForwarded: boolean;
|
|
15154
14803
|
/**
|
|
15155
14804
|
* Reject this email message by returning a permanent SMTP error back to the connecting client including the given reason.
|
|
15156
14805
|
* @param reason The reject reason.
|
|
@@ -17714,6 +17363,365 @@ export declare namespace TailStream {
|
|
|
17714
17363
|
};
|
|
17715
17364
|
type TailEventHandlerType = TailEventHandler | TailEventHandlerObject;
|
|
17716
17365
|
}
|
|
17366
|
+
// URL and URLSearchParams, as WHATWG URL declares them, at every compatibility
|
|
17367
|
+
// date. Without the urlsearchparams_delete_has_value_arg compatibility flag
|
|
17368
|
+
// (the default from 2023-07-01), delete() and has() ignore `value`.
|
|
17369
|
+
/**
|
|
17370
|
+
* The **`URL`** interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL.
|
|
17371
|
+
*
|
|
17372
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
17373
|
+
*/
|
|
17374
|
+
export declare class URL {
|
|
17375
|
+
constructor(url: string | URL, base?: string | URL);
|
|
17376
|
+
/**
|
|
17377
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
17378
|
+
*
|
|
17379
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
17380
|
+
*/
|
|
17381
|
+
get href(): string;
|
|
17382
|
+
/**
|
|
17383
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
17384
|
+
*
|
|
17385
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
17386
|
+
*/
|
|
17387
|
+
set href(value: string);
|
|
17388
|
+
/**
|
|
17389
|
+
* The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
|
|
17390
|
+
*
|
|
17391
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
|
|
17392
|
+
*/
|
|
17393
|
+
get origin(): string;
|
|
17394
|
+
/**
|
|
17395
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
17396
|
+
*
|
|
17397
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
17398
|
+
*/
|
|
17399
|
+
get protocol(): string;
|
|
17400
|
+
/**
|
|
17401
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final ":".
|
|
17402
|
+
*
|
|
17403
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
17404
|
+
*/
|
|
17405
|
+
set protocol(value: string);
|
|
17406
|
+
/**
|
|
17407
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
17408
|
+
*
|
|
17409
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
17410
|
+
*/
|
|
17411
|
+
get username(): string;
|
|
17412
|
+
/**
|
|
17413
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL. If the URL does not have a username, this property contains an empty string, "".
|
|
17414
|
+
*
|
|
17415
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
17416
|
+
*/
|
|
17417
|
+
set username(value: string);
|
|
17418
|
+
/**
|
|
17419
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
17420
|
+
*
|
|
17421
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
17422
|
+
*/
|
|
17423
|
+
get password(): string;
|
|
17424
|
+
/**
|
|
17425
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL. If the URL does not have a password, this property contains an empty string, "".
|
|
17426
|
+
*
|
|
17427
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
17428
|
+
*/
|
|
17429
|
+
set password(value: string);
|
|
17430
|
+
/**
|
|
17431
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
17432
|
+
*
|
|
17433
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
17434
|
+
*/
|
|
17435
|
+
get host(): string;
|
|
17436
|
+
/**
|
|
17437
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the hostname, and then, if the port of the URL is nonempty, a ":", followed by the port of the URL. If the URL does not have a hostname, this property contains an empty string, "".
|
|
17438
|
+
*
|
|
17439
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
17440
|
+
*/
|
|
17441
|
+
set host(value: string);
|
|
17442
|
+
/**
|
|
17443
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
17444
|
+
*
|
|
17445
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
17446
|
+
*/
|
|
17447
|
+
get hostname(): string;
|
|
17448
|
+
/**
|
|
17449
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. If the URL does not have a hostname, this property contains an empty string, "". IPv4 and IPv6 addresses are normalized, such as stripping leading zeros, and domain names are converted to IDN.
|
|
17450
|
+
*
|
|
17451
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
17452
|
+
*/
|
|
17453
|
+
set hostname(value: string);
|
|
17454
|
+
/**
|
|
17455
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
17456
|
+
*
|
|
17457
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
17458
|
+
*/
|
|
17459
|
+
get port(): string;
|
|
17460
|
+
/**
|
|
17461
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL. If the port is the default for the protocol (80 for ws: and http:, 443 for wss: and https:, and 21 for ftp:), this property contains an empty string, "".
|
|
17462
|
+
*
|
|
17463
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
17464
|
+
*/
|
|
17465
|
+
set port(value: string);
|
|
17466
|
+
/**
|
|
17467
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
17468
|
+
*
|
|
17469
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
17470
|
+
*/
|
|
17471
|
+
get pathname(): string;
|
|
17472
|
+
/**
|
|
17473
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character.
|
|
17474
|
+
*
|
|
17475
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
17476
|
+
*/
|
|
17477
|
+
set pathname(value: string);
|
|
17478
|
+
/**
|
|
17479
|
+
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
17480
|
+
*
|
|
17481
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
17482
|
+
*/
|
|
17483
|
+
get search(): string;
|
|
17484
|
+
/**
|
|
17485
|
+
* The **`search`** property of the URL interface is a search string, also called a query string, that is a string containing a "?" followed by the parameters of the URL. If the URL does not have a search query, this property contains an empty string, "".
|
|
17486
|
+
*
|
|
17487
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
17488
|
+
*/
|
|
17489
|
+
set search(value: string);
|
|
17490
|
+
/**
|
|
17491
|
+
* The **`searchParams`** read-only property of the URL interface returns a URLSearchParams object allowing access to the GET decoded query arguments contained in the URL.
|
|
17492
|
+
*
|
|
17493
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
17494
|
+
*/
|
|
17495
|
+
get searchParams(): URLSearchParams;
|
|
17496
|
+
/**
|
|
17497
|
+
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
17498
|
+
*
|
|
17499
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
17500
|
+
*/
|
|
17501
|
+
get hash(): string;
|
|
17502
|
+
/**
|
|
17503
|
+
* The **`hash`** property of the URL interface is a string containing a "#" followed by the fragment identifier of the URL. If the URL does not have a fragment identifier, this property contains an empty string, "".
|
|
17504
|
+
*
|
|
17505
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
17506
|
+
*/
|
|
17507
|
+
set hash(value: string);
|
|
17508
|
+
/**
|
|
17509
|
+
* The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as URL.toString().
|
|
17510
|
+
*
|
|
17511
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
17512
|
+
*/
|
|
17513
|
+
toJSON(): string;
|
|
17514
|
+
toString(): string;
|
|
17515
|
+
/**
|
|
17516
|
+
* The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.
|
|
17517
|
+
*
|
|
17518
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static)
|
|
17519
|
+
*/
|
|
17520
|
+
static canParse(url: string | URL, base?: string | URL): boolean;
|
|
17521
|
+
/**
|
|
17522
|
+
* The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters.
|
|
17523
|
+
*
|
|
17524
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static)
|
|
17525
|
+
*/
|
|
17526
|
+
static parse(url: string | URL, base?: string | URL): URL | null;
|
|
17527
|
+
/**
|
|
17528
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a blob URL pointing to the object given in the parameter.
|
|
17529
|
+
*
|
|
17530
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
17531
|
+
*/
|
|
17532
|
+
static createObjectURL(object: File | Blob): string;
|
|
17533
|
+
/**
|
|
17534
|
+
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
|
|
17535
|
+
*
|
|
17536
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
|
|
17537
|
+
*/
|
|
17538
|
+
static revokeObjectURL(object_url: string): void;
|
|
17539
|
+
}
|
|
17540
|
+
/**
|
|
17541
|
+
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
17542
|
+
*
|
|
17543
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
|
|
17544
|
+
*/
|
|
17545
|
+
export declare class URLSearchParams {
|
|
17546
|
+
constructor(
|
|
17547
|
+
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
17548
|
+
);
|
|
17549
|
+
/**
|
|
17550
|
+
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
17551
|
+
*
|
|
17552
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
|
|
17553
|
+
*/
|
|
17554
|
+
get size(): number;
|
|
17555
|
+
/**
|
|
17556
|
+
* The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
|
|
17557
|
+
*
|
|
17558
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
17559
|
+
*/
|
|
17560
|
+
append(name: string, value: string): void;
|
|
17561
|
+
/**
|
|
17562
|
+
* The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
|
|
17563
|
+
*
|
|
17564
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
17565
|
+
*/
|
|
17566
|
+
delete(name: string, value?: string): void;
|
|
17567
|
+
/**
|
|
17568
|
+
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
17569
|
+
*
|
|
17570
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
17571
|
+
*/
|
|
17572
|
+
get(name: string): string | null;
|
|
17573
|
+
/**
|
|
17574
|
+
* The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
|
|
17575
|
+
*
|
|
17576
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
17577
|
+
*/
|
|
17578
|
+
getAll(name: string): string[];
|
|
17579
|
+
/**
|
|
17580
|
+
* The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
|
|
17581
|
+
*
|
|
17582
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
17583
|
+
*/
|
|
17584
|
+
has(name: string, value?: string): boolean;
|
|
17585
|
+
/**
|
|
17586
|
+
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value. If there were several matching values, this method deletes the others. If the search parameter doesn't exist, this method creates it.
|
|
17587
|
+
*
|
|
17588
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
17589
|
+
*/
|
|
17590
|
+
set(name: string, value: string): void;
|
|
17591
|
+
/**
|
|
17592
|
+
* The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns undefined. Key/value pairs are sorted by the values of the UTF-16 code units of the keys. This method uses a stable sorting algorithm (i.e., the relative order between key/value pairs with equal keys will be preserved).
|
|
17593
|
+
*
|
|
17594
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
|
|
17595
|
+
*/
|
|
17596
|
+
sort(): void;
|
|
17597
|
+
entries(): IterableIterator<[key: string, value: string]>;
|
|
17598
|
+
keys(): IterableIterator<string>;
|
|
17599
|
+
values(): IterableIterator<string>;
|
|
17600
|
+
forEach<This = unknown>(
|
|
17601
|
+
callback: (
|
|
17602
|
+
this: This,
|
|
17603
|
+
value: string,
|
|
17604
|
+
key: string,
|
|
17605
|
+
parent: URLSearchParams,
|
|
17606
|
+
) => void,
|
|
17607
|
+
thisArg?: This,
|
|
17608
|
+
): void;
|
|
17609
|
+
toString(): string;
|
|
17610
|
+
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
17611
|
+
}
|
|
17612
|
+
// URLPattern, as the URLPattern standard declares it, for both parsers.
|
|
17613
|
+
// The legacy parser (the urlpattern_original compatibility flag, the
|
|
17614
|
+
// default before 2025-05-01) has no hasRegExpGroups.
|
|
17615
|
+
/**
|
|
17616
|
+
* The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern. The pattern can contain capturing groups that extract parts of the matched URL.
|
|
17617
|
+
*
|
|
17618
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
|
|
17619
|
+
*/
|
|
17620
|
+
export declare class URLPattern {
|
|
17621
|
+
constructor(
|
|
17622
|
+
input?: string | URLPatternInit,
|
|
17623
|
+
baseURL?: string | URLPatternOptions,
|
|
17624
|
+
patternOptions?: URLPatternOptions,
|
|
17625
|
+
);
|
|
17626
|
+
/**
|
|
17627
|
+
* The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
|
|
17628
|
+
*
|
|
17629
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
|
|
17630
|
+
*/
|
|
17631
|
+
get protocol(): string;
|
|
17632
|
+
/**
|
|
17633
|
+
* The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
|
|
17634
|
+
*
|
|
17635
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
|
|
17636
|
+
*/
|
|
17637
|
+
get username(): string;
|
|
17638
|
+
/**
|
|
17639
|
+
* The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
|
|
17640
|
+
*
|
|
17641
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
|
|
17642
|
+
*/
|
|
17643
|
+
get password(): string;
|
|
17644
|
+
/**
|
|
17645
|
+
* The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
|
|
17646
|
+
*
|
|
17647
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
|
|
17648
|
+
*/
|
|
17649
|
+
get hostname(): string;
|
|
17650
|
+
/**
|
|
17651
|
+
* The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
|
|
17652
|
+
*
|
|
17653
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
|
|
17654
|
+
*/
|
|
17655
|
+
get port(): string;
|
|
17656
|
+
/**
|
|
17657
|
+
* The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
|
|
17658
|
+
*
|
|
17659
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
|
|
17660
|
+
*/
|
|
17661
|
+
get pathname(): string;
|
|
17662
|
+
/**
|
|
17663
|
+
* The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
|
|
17664
|
+
*
|
|
17665
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
|
|
17666
|
+
*/
|
|
17667
|
+
get search(): string;
|
|
17668
|
+
/**
|
|
17669
|
+
* The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
|
|
17670
|
+
*
|
|
17671
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
|
|
17672
|
+
*/
|
|
17673
|
+
get hash(): string;
|
|
17674
|
+
/**
|
|
17675
|
+
* The **`hasRegExpGroups`** read-only property of the URLPattern interface is a boolean indicating whether or not any of the URLPattern components contain regular expression capturing groups.
|
|
17676
|
+
*
|
|
17677
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
|
|
17678
|
+
*/
|
|
17679
|
+
get hasRegExpGroups(): boolean;
|
|
17680
|
+
/**
|
|
17681
|
+
* The **`test()`** method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
|
|
17682
|
+
*
|
|
17683
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
|
|
17684
|
+
*/
|
|
17685
|
+
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
17686
|
+
/**
|
|
17687
|
+
* The **`exec()`** method of the URLPattern interface takes a URL or object of URL parts, and returns either an object containing the results of matching the URL to the pattern, or null if the URL does not match the pattern.
|
|
17688
|
+
*
|
|
17689
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
|
|
17690
|
+
*/
|
|
17691
|
+
exec(
|
|
17692
|
+
input?: string | URLPatternInit,
|
|
17693
|
+
baseURL?: string,
|
|
17694
|
+
): URLPatternResult | null;
|
|
17695
|
+
}
|
|
17696
|
+
export interface URLPatternInit {
|
|
17697
|
+
protocol?: string;
|
|
17698
|
+
username?: string;
|
|
17699
|
+
password?: string;
|
|
17700
|
+
hostname?: string;
|
|
17701
|
+
port?: string;
|
|
17702
|
+
pathname?: string;
|
|
17703
|
+
search?: string;
|
|
17704
|
+
hash?: string;
|
|
17705
|
+
baseURL?: string;
|
|
17706
|
+
}
|
|
17707
|
+
export interface URLPatternComponentResult {
|
|
17708
|
+
input: string;
|
|
17709
|
+
groups: Record<string, string | undefined>;
|
|
17710
|
+
}
|
|
17711
|
+
export interface URLPatternResult {
|
|
17712
|
+
inputs: (string | URLPatternInit)[];
|
|
17713
|
+
protocol: URLPatternComponentResult;
|
|
17714
|
+
username: URLPatternComponentResult;
|
|
17715
|
+
password: URLPatternComponentResult;
|
|
17716
|
+
hostname: URLPatternComponentResult;
|
|
17717
|
+
port: URLPatternComponentResult;
|
|
17718
|
+
pathname: URLPatternComponentResult;
|
|
17719
|
+
search: URLPatternComponentResult;
|
|
17720
|
+
hash: URLPatternComponentResult;
|
|
17721
|
+
}
|
|
17722
|
+
export interface URLPatternOptions {
|
|
17723
|
+
ignoreCase?: boolean;
|
|
17724
|
+
}
|
|
17717
17725
|
// Copyright (c) 2022-2023 Cloudflare, Inc.
|
|
17718
17726
|
// Licensed under the Apache 2.0 license found in the LICENSE file or at:
|
|
17719
17727
|
// https://opensource.org/licenses/Apache-2.0
|