@types/sharedworker 0.0.167 → 0.0.169

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/README.md CHANGED
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
28
28
 
29
29
  ## Deploy Metadata
30
30
 
31
- You can read what changed in version 0.0.167 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.167.
31
+ You can read what changed in version 0.0.169 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.169.
package/index.d.ts CHANGED
@@ -503,6 +503,15 @@ interface RegistrationOptions {
503
503
  updateViaCache?: ServiceWorkerUpdateViaCache;
504
504
  }
505
505
 
506
+ interface Report {
507
+ body?: ReportBody | null;
508
+ type?: string;
509
+ url?: string;
510
+ }
511
+
512
+ interface ReportBody {
513
+ }
514
+
506
515
  interface ReportingObserverOptions {
507
516
  buffered?: boolean;
508
517
  types?: string[];
@@ -641,6 +650,39 @@ interface Transformer<I = any, O = any> {
641
650
  writableType?: undefined;
642
651
  }
643
652
 
653
+ interface URLPatternComponentResult {
654
+ groups?: Record<string, string | undefined>;
655
+ input?: string;
656
+ }
657
+
658
+ interface URLPatternInit {
659
+ baseURL?: string;
660
+ hash?: string;
661
+ hostname?: string;
662
+ password?: string;
663
+ pathname?: string;
664
+ port?: string;
665
+ protocol?: string;
666
+ search?: string;
667
+ username?: string;
668
+ }
669
+
670
+ interface URLPatternOptions {
671
+ ignoreCase?: boolean;
672
+ }
673
+
674
+ interface URLPatternResult {
675
+ hash?: URLPatternComponentResult;
676
+ hostname?: URLPatternComponentResult;
677
+ inputs?: URLPatternInput[];
678
+ password?: URLPatternComponentResult;
679
+ pathname?: URLPatternComponentResult;
680
+ port?: URLPatternComponentResult;
681
+ protocol?: URLPatternComponentResult;
682
+ search?: URLPatternComponentResult;
683
+ username?: URLPatternComponentResult;
684
+ }
685
+
644
686
  interface UnderlyingByteSource {
645
687
  autoAllocateChunkSize?: number;
646
688
  cancel?: UnderlyingSourceCancelCallback;
@@ -2091,7 +2133,7 @@ declare var CryptoKey: {
2091
2133
  };
2092
2134
 
2093
2135
  /**
2094
- * The **`CustomEvent`** interface represents events initialized by an application for any purpose.
2136
+ * The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
2095
2137
  *
2096
2138
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
2097
2139
  */
@@ -6103,57 +6145,6 @@ interface ReadableStreamGenericReader {
6103
6145
  cancel(reason?: any): Promise<void>;
6104
6146
  }
6105
6147
 
6106
- /**
6107
- * The `Report` interface of the Reporting API represents a single report.
6108
- *
6109
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report)
6110
- */
6111
- interface Report {
6112
- /**
6113
- * The **`body`** read-only property of the Report interface returns the body of the report, which is a `ReportBody` object containing the detailed report information.
6114
- *
6115
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/body)
6116
- */
6117
- readonly body: ReportBody | null;
6118
- /**
6119
- * The **`type`** read-only property of the Report interface returns the type of report generated, e.g., `deprecation` or `intervention`.
6120
- *
6121
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/type)
6122
- */
6123
- readonly type: string;
6124
- /**
6125
- * The **`url`** read-only property of the Report interface returns the URL of the document that generated the report.
6126
- *
6127
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/url)
6128
- */
6129
- readonly url: string;
6130
- toJSON(): any;
6131
- }
6132
-
6133
- declare var Report: {
6134
- prototype: Report;
6135
- new(): Report;
6136
- };
6137
-
6138
- /**
6139
- * The **`ReportBody`** interface of the Reporting API represents the body of a report.
6140
- *
6141
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody)
6142
- */
6143
- interface ReportBody {
6144
- /**
6145
- * The **`toJSON()`** method of the ReportBody interface is a _serializer_, and returns a JSON representation of the `ReportBody` object.
6146
- *
6147
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody/toJSON)
6148
- */
6149
- toJSON(): any;
6150
- }
6151
-
6152
- declare var ReportBody: {
6153
- prototype: ReportBody;
6154
- new(): ReportBody;
6155
- };
6156
-
6157
6148
  /**
6158
6149
  * The `ReportingObserver` interface of the Reporting API allows you to collect and access reports.
6159
6150
  *
@@ -6503,7 +6494,7 @@ interface ServiceWorkerContainerEventMap {
6503
6494
  */
6504
6495
  interface ServiceWorkerContainer extends EventTarget {
6505
6496
  /**
6506
- * The **`controller`** read-only property of the ServiceWorkerContainer interface returns a `activated` (the same object returned by `null` if the request is a force refresh (_Shift_ + refresh) or if there is no active worker.
6497
+ * The **`controller`** read-only property of the ServiceWorkerContainer interface represents the active ServiceWorker controlling the current page (associated with this `ServiceWorkerContainer`), or `null` if the page has no active or activating service worker.
6507
6498
  *
6508
6499
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/controller)
6509
6500
  */
@@ -6843,7 +6834,7 @@ declare var SubtleCrypto: {
6843
6834
  };
6844
6835
 
6845
6836
  /**
6846
- * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
6837
+ * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
6847
6838
  *
6848
6839
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
6849
6840
  */
@@ -6898,19 +6889,19 @@ declare var TextDecoderStream: {
6898
6889
  };
6899
6890
 
6900
6891
  /**
6901
- * The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
6892
+ * The **`TextEncoder`** interface enables you to character encoding a JavaScript string using UTF-8.
6902
6893
  *
6903
6894
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
6904
6895
  */
6905
6896
  interface TextEncoder extends TextEncoderCommon {
6906
6897
  /**
6907
- * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the text given in parameters encoded with the specific method for that TextEncoder object.
6898
+ * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the string character encoding using UTF-8.
6908
6899
  *
6909
6900
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
6910
6901
  */
6911
6902
  encode(input?: string): Uint8Array<ArrayBuffer>;
6912
6903
  /**
6913
- * The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns a dictionary object indicating the progress of the encoding.
6904
+ * The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns an object indicating the progress of the encoding.
6914
6905
  *
6915
6906
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
6916
6907
  */
@@ -7209,6 +7200,86 @@ declare var URL: {
7209
7200
  revokeObjectURL(url: string): void;
7210
7201
  };
7211
7202
 
7203
+ /**
7204
+ * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern.
7205
+ *
7206
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
7207
+ */
7208
+ interface URLPattern {
7209
+ /**
7210
+ * 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.
7211
+ *
7212
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
7213
+ */
7214
+ readonly hasRegExpGroups: boolean;
7215
+ /**
7216
+ * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
7217
+ *
7218
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
7219
+ */
7220
+ readonly hash: string;
7221
+ /**
7222
+ * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
7223
+ *
7224
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
7225
+ */
7226
+ readonly hostname: string;
7227
+ /**
7228
+ * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
7229
+ *
7230
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
7231
+ */
7232
+ readonly password: string;
7233
+ /**
7234
+ * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
7235
+ *
7236
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
7237
+ */
7238
+ readonly pathname: string;
7239
+ /**
7240
+ * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
7241
+ *
7242
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
7243
+ */
7244
+ readonly port: string;
7245
+ /**
7246
+ * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
7247
+ *
7248
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
7249
+ */
7250
+ readonly protocol: string;
7251
+ /**
7252
+ * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
7253
+ *
7254
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
7255
+ */
7256
+ readonly search: string;
7257
+ /**
7258
+ * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
7259
+ *
7260
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
7261
+ */
7262
+ readonly username: string;
7263
+ /**
7264
+ * 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.
7265
+ *
7266
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
7267
+ */
7268
+ exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
7269
+ /**
7270
+ * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
7271
+ *
7272
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
7273
+ */
7274
+ test(input?: URLPatternInput, baseURL?: string | URL): boolean;
7275
+ }
7276
+
7277
+ declare var URLPattern: {
7278
+ prototype: URLPattern;
7279
+ new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern;
7280
+ new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
7281
+ };
7282
+
7212
7283
  /**
7213
7284
  * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
7214
7285
  *
@@ -11069,6 +11140,7 @@ type RequestInfo = Request | string;
11069
11140
  type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
11070
11141
  type TimerHandler = string | Function;
11071
11142
  type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer;
11143
+ type URLPatternInput = string | URLPatternInit;
11072
11144
  type Uint32List = Uint32Array<ArrayBufferLike> | GLuint[];
11073
11145
  type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
11074
11146
  type BinaryType = "arraybuffer" | "blob";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/sharedworker",
3
- "version": "0.0.167",
3
+ "version": "0.0.169",
4
4
  "description": "Types for the global scope of Shared Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -503,6 +503,15 @@ interface RegistrationOptions {
503
503
  updateViaCache?: ServiceWorkerUpdateViaCache;
504
504
  }
505
505
 
506
+ interface Report {
507
+ body?: ReportBody | null;
508
+ type?: string;
509
+ url?: string;
510
+ }
511
+
512
+ interface ReportBody {
513
+ }
514
+
506
515
  interface ReportingObserverOptions {
507
516
  buffered?: boolean;
508
517
  types?: string[];
@@ -641,6 +650,39 @@ interface Transformer<I = any, O = any> {
641
650
  writableType?: undefined;
642
651
  }
643
652
 
653
+ interface URLPatternComponentResult {
654
+ groups?: Record<string, string | undefined>;
655
+ input?: string;
656
+ }
657
+
658
+ interface URLPatternInit {
659
+ baseURL?: string;
660
+ hash?: string;
661
+ hostname?: string;
662
+ password?: string;
663
+ pathname?: string;
664
+ port?: string;
665
+ protocol?: string;
666
+ search?: string;
667
+ username?: string;
668
+ }
669
+
670
+ interface URLPatternOptions {
671
+ ignoreCase?: boolean;
672
+ }
673
+
674
+ interface URLPatternResult {
675
+ hash?: URLPatternComponentResult;
676
+ hostname?: URLPatternComponentResult;
677
+ inputs?: URLPatternInput[];
678
+ password?: URLPatternComponentResult;
679
+ pathname?: URLPatternComponentResult;
680
+ port?: URLPatternComponentResult;
681
+ protocol?: URLPatternComponentResult;
682
+ search?: URLPatternComponentResult;
683
+ username?: URLPatternComponentResult;
684
+ }
685
+
644
686
  interface UnderlyingByteSource {
645
687
  autoAllocateChunkSize?: number;
646
688
  cancel?: UnderlyingSourceCancelCallback;
@@ -2091,7 +2133,7 @@ declare var CryptoKey: {
2091
2133
  };
2092
2134
 
2093
2135
  /**
2094
- * The **`CustomEvent`** interface represents events initialized by an application for any purpose.
2136
+ * The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
2095
2137
  *
2096
2138
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
2097
2139
  */
@@ -6103,57 +6145,6 @@ interface ReadableStreamGenericReader {
6103
6145
  cancel(reason?: any): Promise<void>;
6104
6146
  }
6105
6147
 
6106
- /**
6107
- * The `Report` interface of the Reporting API represents a single report.
6108
- *
6109
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report)
6110
- */
6111
- interface Report {
6112
- /**
6113
- * The **`body`** read-only property of the Report interface returns the body of the report, which is a `ReportBody` object containing the detailed report information.
6114
- *
6115
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/body)
6116
- */
6117
- readonly body: ReportBody | null;
6118
- /**
6119
- * The **`type`** read-only property of the Report interface returns the type of report generated, e.g., `deprecation` or `intervention`.
6120
- *
6121
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/type)
6122
- */
6123
- readonly type: string;
6124
- /**
6125
- * The **`url`** read-only property of the Report interface returns the URL of the document that generated the report.
6126
- *
6127
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/url)
6128
- */
6129
- readonly url: string;
6130
- toJSON(): any;
6131
- }
6132
-
6133
- declare var Report: {
6134
- prototype: Report;
6135
- new(): Report;
6136
- };
6137
-
6138
- /**
6139
- * The **`ReportBody`** interface of the Reporting API represents the body of a report.
6140
- *
6141
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody)
6142
- */
6143
- interface ReportBody {
6144
- /**
6145
- * The **`toJSON()`** method of the ReportBody interface is a _serializer_, and returns a JSON representation of the `ReportBody` object.
6146
- *
6147
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody/toJSON)
6148
- */
6149
- toJSON(): any;
6150
- }
6151
-
6152
- declare var ReportBody: {
6153
- prototype: ReportBody;
6154
- new(): ReportBody;
6155
- };
6156
-
6157
6148
  /**
6158
6149
  * The `ReportingObserver` interface of the Reporting API allows you to collect and access reports.
6159
6150
  *
@@ -6503,7 +6494,7 @@ interface ServiceWorkerContainerEventMap {
6503
6494
  */
6504
6495
  interface ServiceWorkerContainer extends EventTarget {
6505
6496
  /**
6506
- * The **`controller`** read-only property of the ServiceWorkerContainer interface returns a `activated` (the same object returned by `null` if the request is a force refresh (_Shift_ + refresh) or if there is no active worker.
6497
+ * The **`controller`** read-only property of the ServiceWorkerContainer interface represents the active ServiceWorker controlling the current page (associated with this `ServiceWorkerContainer`), or `null` if the page has no active or activating service worker.
6507
6498
  *
6508
6499
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/controller)
6509
6500
  */
@@ -6843,7 +6834,7 @@ declare var SubtleCrypto: {
6843
6834
  };
6844
6835
 
6845
6836
  /**
6846
- * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
6837
+ * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
6847
6838
  *
6848
6839
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
6849
6840
  */
@@ -6898,19 +6889,19 @@ declare var TextDecoderStream: {
6898
6889
  };
6899
6890
 
6900
6891
  /**
6901
- * The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
6892
+ * The **`TextEncoder`** interface enables you to character encoding a JavaScript string using UTF-8.
6902
6893
  *
6903
6894
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
6904
6895
  */
6905
6896
  interface TextEncoder extends TextEncoderCommon {
6906
6897
  /**
6907
- * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the text given in parameters encoded with the specific method for that TextEncoder object.
6898
+ * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the string character encoding using UTF-8.
6908
6899
  *
6909
6900
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
6910
6901
  */
6911
6902
  encode(input?: string): Uint8Array;
6912
6903
  /**
6913
- * The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns a dictionary object indicating the progress of the encoding.
6904
+ * The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns an object indicating the progress of the encoding.
6914
6905
  *
6915
6906
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
6916
6907
  */
@@ -7209,6 +7200,86 @@ declare var URL: {
7209
7200
  revokeObjectURL(url: string): void;
7210
7201
  };
7211
7202
 
7203
+ /**
7204
+ * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern.
7205
+ *
7206
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
7207
+ */
7208
+ interface URLPattern {
7209
+ /**
7210
+ * 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.
7211
+ *
7212
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
7213
+ */
7214
+ readonly hasRegExpGroups: boolean;
7215
+ /**
7216
+ * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
7217
+ *
7218
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
7219
+ */
7220
+ readonly hash: string;
7221
+ /**
7222
+ * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
7223
+ *
7224
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
7225
+ */
7226
+ readonly hostname: string;
7227
+ /**
7228
+ * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
7229
+ *
7230
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
7231
+ */
7232
+ readonly password: string;
7233
+ /**
7234
+ * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
7235
+ *
7236
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
7237
+ */
7238
+ readonly pathname: string;
7239
+ /**
7240
+ * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
7241
+ *
7242
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
7243
+ */
7244
+ readonly port: string;
7245
+ /**
7246
+ * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
7247
+ *
7248
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
7249
+ */
7250
+ readonly protocol: string;
7251
+ /**
7252
+ * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
7253
+ *
7254
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
7255
+ */
7256
+ readonly search: string;
7257
+ /**
7258
+ * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
7259
+ *
7260
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
7261
+ */
7262
+ readonly username: string;
7263
+ /**
7264
+ * 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.
7265
+ *
7266
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
7267
+ */
7268
+ exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
7269
+ /**
7270
+ * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
7271
+ *
7272
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
7273
+ */
7274
+ test(input?: URLPatternInput, baseURL?: string | URL): boolean;
7275
+ }
7276
+
7277
+ declare var URLPattern: {
7278
+ prototype: URLPattern;
7279
+ new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern;
7280
+ new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
7281
+ };
7282
+
7212
7283
  /**
7213
7284
  * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
7214
7285
  *
@@ -11069,6 +11140,7 @@ type RequestInfo = Request | string;
11069
11140
  type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
11070
11141
  type TimerHandler = string | Function;
11071
11142
  type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer;
11143
+ type URLPatternInput = string | URLPatternInit;
11072
11144
  type Uint32List = Uint32Array | GLuint[];
11073
11145
  type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
11074
11146
  type BinaryType = "arraybuffer" | "blob";
package/ts5.6/index.d.ts CHANGED
@@ -503,6 +503,15 @@ interface RegistrationOptions {
503
503
  updateViaCache?: ServiceWorkerUpdateViaCache;
504
504
  }
505
505
 
506
+ interface Report {
507
+ body?: ReportBody | null;
508
+ type?: string;
509
+ url?: string;
510
+ }
511
+
512
+ interface ReportBody {
513
+ }
514
+
506
515
  interface ReportingObserverOptions {
507
516
  buffered?: boolean;
508
517
  types?: string[];
@@ -641,6 +650,39 @@ interface Transformer<I = any, O = any> {
641
650
  writableType?: undefined;
642
651
  }
643
652
 
653
+ interface URLPatternComponentResult {
654
+ groups?: Record<string, string | undefined>;
655
+ input?: string;
656
+ }
657
+
658
+ interface URLPatternInit {
659
+ baseURL?: string;
660
+ hash?: string;
661
+ hostname?: string;
662
+ password?: string;
663
+ pathname?: string;
664
+ port?: string;
665
+ protocol?: string;
666
+ search?: string;
667
+ username?: string;
668
+ }
669
+
670
+ interface URLPatternOptions {
671
+ ignoreCase?: boolean;
672
+ }
673
+
674
+ interface URLPatternResult {
675
+ hash?: URLPatternComponentResult;
676
+ hostname?: URLPatternComponentResult;
677
+ inputs?: URLPatternInput[];
678
+ password?: URLPatternComponentResult;
679
+ pathname?: URLPatternComponentResult;
680
+ port?: URLPatternComponentResult;
681
+ protocol?: URLPatternComponentResult;
682
+ search?: URLPatternComponentResult;
683
+ username?: URLPatternComponentResult;
684
+ }
685
+
644
686
  interface UnderlyingByteSource {
645
687
  autoAllocateChunkSize?: number;
646
688
  cancel?: UnderlyingSourceCancelCallback;
@@ -2091,7 +2133,7 @@ declare var CryptoKey: {
2091
2133
  };
2092
2134
 
2093
2135
  /**
2094
- * The **`CustomEvent`** interface represents events initialized by an application for any purpose.
2136
+ * The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
2095
2137
  *
2096
2138
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
2097
2139
  */
@@ -6103,57 +6145,6 @@ interface ReadableStreamGenericReader {
6103
6145
  cancel(reason?: any): Promise<void>;
6104
6146
  }
6105
6147
 
6106
- /**
6107
- * The `Report` interface of the Reporting API represents a single report.
6108
- *
6109
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report)
6110
- */
6111
- interface Report {
6112
- /**
6113
- * The **`body`** read-only property of the Report interface returns the body of the report, which is a `ReportBody` object containing the detailed report information.
6114
- *
6115
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/body)
6116
- */
6117
- readonly body: ReportBody | null;
6118
- /**
6119
- * The **`type`** read-only property of the Report interface returns the type of report generated, e.g., `deprecation` or `intervention`.
6120
- *
6121
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/type)
6122
- */
6123
- readonly type: string;
6124
- /**
6125
- * The **`url`** read-only property of the Report interface returns the URL of the document that generated the report.
6126
- *
6127
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/url)
6128
- */
6129
- readonly url: string;
6130
- toJSON(): any;
6131
- }
6132
-
6133
- declare var Report: {
6134
- prototype: Report;
6135
- new(): Report;
6136
- };
6137
-
6138
- /**
6139
- * The **`ReportBody`** interface of the Reporting API represents the body of a report.
6140
- *
6141
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody)
6142
- */
6143
- interface ReportBody {
6144
- /**
6145
- * The **`toJSON()`** method of the ReportBody interface is a _serializer_, and returns a JSON representation of the `ReportBody` object.
6146
- *
6147
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody/toJSON)
6148
- */
6149
- toJSON(): any;
6150
- }
6151
-
6152
- declare var ReportBody: {
6153
- prototype: ReportBody;
6154
- new(): ReportBody;
6155
- };
6156
-
6157
6148
  /**
6158
6149
  * The `ReportingObserver` interface of the Reporting API allows you to collect and access reports.
6159
6150
  *
@@ -6503,7 +6494,7 @@ interface ServiceWorkerContainerEventMap {
6503
6494
  */
6504
6495
  interface ServiceWorkerContainer extends EventTarget {
6505
6496
  /**
6506
- * The **`controller`** read-only property of the ServiceWorkerContainer interface returns a `activated` (the same object returned by `null` if the request is a force refresh (_Shift_ + refresh) or if there is no active worker.
6497
+ * The **`controller`** read-only property of the ServiceWorkerContainer interface represents the active ServiceWorker controlling the current page (associated with this `ServiceWorkerContainer`), or `null` if the page has no active or activating service worker.
6507
6498
  *
6508
6499
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/controller)
6509
6500
  */
@@ -6843,7 +6834,7 @@ declare var SubtleCrypto: {
6843
6834
  };
6844
6835
 
6845
6836
  /**
6846
- * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
6837
+ * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
6847
6838
  *
6848
6839
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
6849
6840
  */
@@ -6898,19 +6889,19 @@ declare var TextDecoderStream: {
6898
6889
  };
6899
6890
 
6900
6891
  /**
6901
- * The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
6892
+ * The **`TextEncoder`** interface enables you to character encoding a JavaScript string using UTF-8.
6902
6893
  *
6903
6894
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
6904
6895
  */
6905
6896
  interface TextEncoder extends TextEncoderCommon {
6906
6897
  /**
6907
- * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the text given in parameters encoded with the specific method for that TextEncoder object.
6898
+ * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the string character encoding using UTF-8.
6908
6899
  *
6909
6900
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
6910
6901
  */
6911
6902
  encode(input?: string): Uint8Array;
6912
6903
  /**
6913
- * The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns a dictionary object indicating the progress of the encoding.
6904
+ * The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns an object indicating the progress of the encoding.
6914
6905
  *
6915
6906
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
6916
6907
  */
@@ -7209,6 +7200,86 @@ declare var URL: {
7209
7200
  revokeObjectURL(url: string): void;
7210
7201
  };
7211
7202
 
7203
+ /**
7204
+ * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern.
7205
+ *
7206
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
7207
+ */
7208
+ interface URLPattern {
7209
+ /**
7210
+ * 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.
7211
+ *
7212
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
7213
+ */
7214
+ readonly hasRegExpGroups: boolean;
7215
+ /**
7216
+ * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
7217
+ *
7218
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
7219
+ */
7220
+ readonly hash: string;
7221
+ /**
7222
+ * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
7223
+ *
7224
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
7225
+ */
7226
+ readonly hostname: string;
7227
+ /**
7228
+ * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
7229
+ *
7230
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
7231
+ */
7232
+ readonly password: string;
7233
+ /**
7234
+ * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
7235
+ *
7236
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
7237
+ */
7238
+ readonly pathname: string;
7239
+ /**
7240
+ * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
7241
+ *
7242
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
7243
+ */
7244
+ readonly port: string;
7245
+ /**
7246
+ * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
7247
+ *
7248
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
7249
+ */
7250
+ readonly protocol: string;
7251
+ /**
7252
+ * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
7253
+ *
7254
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
7255
+ */
7256
+ readonly search: string;
7257
+ /**
7258
+ * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
7259
+ *
7260
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
7261
+ */
7262
+ readonly username: string;
7263
+ /**
7264
+ * 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.
7265
+ *
7266
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
7267
+ */
7268
+ exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
7269
+ /**
7270
+ * The **`test()`** method of the URLPattern interface takes a URL or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.
7271
+ *
7272
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
7273
+ */
7274
+ test(input?: URLPatternInput, baseURL?: string | URL): boolean;
7275
+ }
7276
+
7277
+ declare var URLPattern: {
7278
+ prototype: URLPattern;
7279
+ new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern;
7280
+ new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
7281
+ };
7282
+
7212
7283
  /**
7213
7284
  * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
7214
7285
  *
@@ -11069,6 +11140,7 @@ type RequestInfo = Request | string;
11069
11140
  type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
11070
11141
  type TimerHandler = string | Function;
11071
11142
  type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | ArrayBuffer;
11143
+ type URLPatternInput = string | URLPatternInit;
11072
11144
  type Uint32List = Uint32Array | GLuint[];
11073
11145
  type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
11074
11146
  type BinaryType = "arraybuffer" | "blob";