Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit d8627aa

Browse files
author
autodecl-bot[bot]
authored
Updated types for 2022-03-02
1 parent 4fef02b commit d8627aa

File tree

3 files changed

+497
-108
lines changed

3 files changed

+497
-108
lines changed

.changeset/2022-03-02.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/workers-types": minor
3+
---
4+
5+
Updated auto-generated types @ 2022-03-02

index.d.ts

+62-10
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,14 @@ interface EndTag {
475475
remove(): EndTag;
476476
}
477477

478+
interface ErrorEvent extends Event {
479+
readonly filename: string;
480+
readonly message: string;
481+
readonly lineno: number;
482+
readonly colno: number;
483+
readonly error: any;
484+
}
485+
478486
declare class Event {
479487
constructor(type: string, init?: EventInit);
480488
readonly type: string;
@@ -917,6 +925,10 @@ interface MessageEventInit {
917925
*/
918926
declare type MessageEventInitializer = MessageEventInit;
919927

928+
declare abstract class Navigator {
929+
readonly userAgent: string;
930+
}
931+
920932
/**
921933
* Transitionary name.
922934
* @deprecated Use StreamPipeOptions
@@ -1325,6 +1337,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
13251337
crypto: Crypto;
13261338
caches: CacheStorage;
13271339
scheduler: Scheduler;
1340+
navigator: Navigator;
13281341
readonly console: Console;
13291342
origin: void;
13301343
}
@@ -1533,6 +1546,52 @@ declare class URL {
15331546
toJSON(): string;
15341547
}
15351548

1549+
declare class URLPattern {
1550+
constructor(input?: string | URLPatternURLPatternInit, baseURL?: string);
1551+
readonly protocol: string;
1552+
readonly username: string;
1553+
readonly password: string;
1554+
readonly hostname: string;
1555+
readonly port: string;
1556+
readonly pathname: string;
1557+
readonly search: string;
1558+
readonly hash: string;
1559+
test(input?: string | URLPatternURLPatternInit, baseURL?: string): boolean;
1560+
exec(
1561+
input?: string | URLPatternURLPatternInit,
1562+
baseURL?: string
1563+
): URLPatternURLPatternResult | null;
1564+
}
1565+
1566+
interface URLPatternURLPatternComponentResult {
1567+
input: string;
1568+
groups: Record<string, string>;
1569+
}
1570+
1571+
interface URLPatternURLPatternInit {
1572+
protocol?: string;
1573+
username?: string;
1574+
password?: string;
1575+
hostname?: string;
1576+
port?: string;
1577+
pathname?: string;
1578+
search?: string;
1579+
hash?: string;
1580+
baseURL?: string;
1581+
}
1582+
1583+
interface URLPatternURLPatternResult {
1584+
inputs: (string | URLPatternURLPatternInit)[];
1585+
protocol: URLPatternURLPatternComponentResult;
1586+
username: URLPatternURLPatternComponentResult;
1587+
password: URLPatternURLPatternComponentResult;
1588+
hostname: URLPatternURLPatternComponentResult;
1589+
port: URLPatternURLPatternComponentResult;
1590+
pathname: URLPatternURLPatternComponentResult;
1591+
search: URLPatternURLPatternComponentResult;
1592+
hash: URLPatternURLPatternComponentResult;
1593+
}
1594+
15361595
declare class URLSearchParams {
15371596
constructor(init?: URLSearchParamsInit);
15381597
append(name: string, value: string): void;
@@ -1572,16 +1631,7 @@ declare type URLSearchParamsInit =
15721631
*/
15731632
declare type URLSearchParamsInitializer = URLSearchParamsInit;
15741633

1575-
declare abstract class WebSocket extends EventTarget<WebSocketEventMap> {
1576-
accept(): void;
1577-
send(message: ArrayBuffer | string): void;
1578-
close(code?: number, reason?: string): void;
1579-
static readonly READY_STATE_CONNECTING: number;
1580-
static readonly READY_STATE_OPEN: number;
1581-
static readonly READY_STATE_CLOSING: number;
1582-
static readonly READY_STATE_CLOSED: number;
1583-
readonly readyState: number;
1584-
}
1634+
declare abstract class WebSocket extends EventTarget<WebSocketEventMap> {}
15851635

15861636
declare type WebSocketEventMap = {
15871637
close: CloseEvent;
@@ -1660,6 +1710,8 @@ declare function fetch(
16601710
requestInitr?: RequestInit | Request
16611711
): Promise<Response>;
16621712

1713+
declare const navigator: Navigator;
1714+
16631715
declare const origin: void;
16641716

16651717
declare function queueMicrotask(task: Function): void;

0 commit comments

Comments
 (0)