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