@types/webworker 0.0.14 → 0.0.16

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
@@ -45,4 +45,4 @@ This project does not respect semantic versioning as almost every change could p
45
45
 
46
46
  ## Deploy Metadata
47
47
 
48
- You can read what changed in version 0.0.14 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.14.
48
+ You can read what changed in version 0.0.16 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.16.
package/index.d.ts CHANGED
@@ -717,6 +717,15 @@ interface RegistrationOptions {
717
717
  updateViaCache?: ServiceWorkerUpdateViaCache;
718
718
  }
719
719
 
720
+ interface Report {
721
+ body?: ReportBody | null;
722
+ type?: string;
723
+ url?: string;
724
+ }
725
+
726
+ interface ReportBody {
727
+ }
728
+
720
729
  interface ReportingObserverOptions {
721
730
  buffered?: boolean;
722
731
  types?: string[];
@@ -855,6 +864,39 @@ interface Transformer<I = any, O = any> {
855
864
  writableType?: undefined;
856
865
  }
857
866
 
867
+ interface URLPatternComponentResult {
868
+ groups?: Record<string, string | undefined>;
869
+ input?: string;
870
+ }
871
+
872
+ interface URLPatternInit {
873
+ baseURL?: string;
874
+ hash?: string;
875
+ hostname?: string;
876
+ password?: string;
877
+ pathname?: string;
878
+ port?: string;
879
+ protocol?: string;
880
+ search?: string;
881
+ username?: string;
882
+ }
883
+
884
+ interface URLPatternOptions {
885
+ ignoreCase?: boolean;
886
+ }
887
+
888
+ interface URLPatternResult {
889
+ hash?: URLPatternComponentResult;
890
+ hostname?: URLPatternComponentResult;
891
+ inputs?: URLPatternInput[];
892
+ password?: URLPatternComponentResult;
893
+ pathname?: URLPatternComponentResult;
894
+ port?: URLPatternComponentResult;
895
+ protocol?: URLPatternComponentResult;
896
+ search?: URLPatternComponentResult;
897
+ username?: URLPatternComponentResult;
898
+ }
899
+
858
900
  interface UnderlyingByteSource {
859
901
  autoAllocateChunkSize?: number;
860
902
  cancel?: UnderlyingSourceCancelCallback;
@@ -2778,7 +2820,7 @@ declare var CryptoKey: {
2778
2820
  };
2779
2821
 
2780
2822
  /**
2781
- * The **`CustomEvent`** interface represents events initialized by an application for any purpose.
2823
+ * The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
2782
2824
  *
2783
2825
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
2784
2826
  */
@@ -7622,57 +7664,6 @@ interface ReadableStreamGenericReader {
7622
7664
  cancel(reason?: any): Promise<void>;
7623
7665
  }
7624
7666
 
7625
- /**
7626
- * The `Report` interface of the Reporting API represents a single report.
7627
- *
7628
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report)
7629
- */
7630
- interface Report {
7631
- /**
7632
- * 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.
7633
- *
7634
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/body)
7635
- */
7636
- readonly body: ReportBody | null;
7637
- /**
7638
- * The **`type`** read-only property of the Report interface returns the type of report generated, e.g., `deprecation` or `intervention`.
7639
- *
7640
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/type)
7641
- */
7642
- readonly type: string;
7643
- /**
7644
- * The **`url`** read-only property of the Report interface returns the URL of the document that generated the report.
7645
- *
7646
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/url)
7647
- */
7648
- readonly url: string;
7649
- toJSON(): any;
7650
- }
7651
-
7652
- declare var Report: {
7653
- prototype: Report;
7654
- new(): Report;
7655
- };
7656
-
7657
- /**
7658
- * The **`ReportBody`** interface of the Reporting API represents the body of a report.
7659
- *
7660
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody)
7661
- */
7662
- interface ReportBody {
7663
- /**
7664
- * The **`toJSON()`** method of the ReportBody interface is a _serializer_, and returns a JSON representation of the `ReportBody` object.
7665
- *
7666
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody/toJSON)
7667
- */
7668
- toJSON(): any;
7669
- }
7670
-
7671
- declare var ReportBody: {
7672
- prototype: ReportBody;
7673
- new(): ReportBody;
7674
- };
7675
-
7676
7667
  /**
7677
7668
  * The `ReportingObserver` interface of the Reporting API allows you to collect and access reports.
7678
7669
  *
@@ -8022,7 +8013,7 @@ interface ServiceWorkerContainerEventMap {
8022
8013
  */
8023
8014
  interface ServiceWorkerContainer extends EventTarget {
8024
8015
  /**
8025
- * 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.
8016
+ * 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.
8026
8017
  *
8027
8018
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/controller)
8028
8019
  */
@@ -8449,7 +8440,7 @@ declare var SubtleCrypto: {
8449
8440
  };
8450
8441
 
8451
8442
  /**
8452
- * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
8443
+ * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
8453
8444
  *
8454
8445
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
8455
8446
  */
@@ -8504,19 +8495,19 @@ declare var TextDecoderStream: {
8504
8495
  };
8505
8496
 
8506
8497
  /**
8507
- * The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
8498
+ * The **`TextEncoder`** interface enables you to character encoding a JavaScript string using UTF-8.
8508
8499
  *
8509
8500
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
8510
8501
  */
8511
8502
  interface TextEncoder extends TextEncoderCommon {
8512
8503
  /**
8513
- * 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.
8504
+ * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the string character encoding using UTF-8.
8514
8505
  *
8515
8506
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
8516
8507
  */
8517
8508
  encode(input?: string): Uint8Array<ArrayBuffer>;
8518
8509
  /**
8519
- * 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.
8510
+ * 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.
8520
8511
  *
8521
8512
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
8522
8513
  */
@@ -8815,6 +8806,86 @@ declare var URL: {
8815
8806
  revokeObjectURL(url: string): void;
8816
8807
  };
8817
8808
 
8809
+ /**
8810
+ * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern.
8811
+ *
8812
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
8813
+ */
8814
+ interface URLPattern {
8815
+ /**
8816
+ * 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.
8817
+ *
8818
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
8819
+ */
8820
+ readonly hasRegExpGroups: boolean;
8821
+ /**
8822
+ * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
8823
+ *
8824
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
8825
+ */
8826
+ readonly hash: string;
8827
+ /**
8828
+ * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
8829
+ *
8830
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
8831
+ */
8832
+ readonly hostname: string;
8833
+ /**
8834
+ * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
8835
+ *
8836
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
8837
+ */
8838
+ readonly password: string;
8839
+ /**
8840
+ * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
8841
+ *
8842
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
8843
+ */
8844
+ readonly pathname: string;
8845
+ /**
8846
+ * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
8847
+ *
8848
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
8849
+ */
8850
+ readonly port: string;
8851
+ /**
8852
+ * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
8853
+ *
8854
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
8855
+ */
8856
+ readonly protocol: string;
8857
+ /**
8858
+ * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
8859
+ *
8860
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
8861
+ */
8862
+ readonly search: string;
8863
+ /**
8864
+ * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
8865
+ *
8866
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
8867
+ */
8868
+ readonly username: string;
8869
+ /**
8870
+ * 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.
8871
+ *
8872
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
8873
+ */
8874
+ exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
8875
+ /**
8876
+ * 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.
8877
+ *
8878
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
8879
+ */
8880
+ test(input?: URLPatternInput, baseURL?: string | URL): boolean;
8881
+ }
8882
+
8883
+ declare var URLPattern: {
8884
+ prototype: URLPattern;
8885
+ new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern;
8886
+ new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
8887
+ };
8888
+
8818
8889
  /**
8819
8890
  * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
8820
8891
  *
@@ -13039,6 +13110,7 @@ type RequestInfo = Request | string;
13039
13110
  type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame;
13040
13111
  type TimerHandler = string | Function;
13041
13112
  type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer;
13113
+ type URLPatternInput = string | URLPatternInit;
13042
13114
  type Uint32List = Uint32Array<ArrayBufferLike> | GLuint[];
13043
13115
  type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
13044
13116
  type AlphaOption = "discard" | "keep";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/webworker",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Types for the global scope of Web Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -717,6 +717,15 @@ interface RegistrationOptions {
717
717
  updateViaCache?: ServiceWorkerUpdateViaCache;
718
718
  }
719
719
 
720
+ interface Report {
721
+ body?: ReportBody | null;
722
+ type?: string;
723
+ url?: string;
724
+ }
725
+
726
+ interface ReportBody {
727
+ }
728
+
720
729
  interface ReportingObserverOptions {
721
730
  buffered?: boolean;
722
731
  types?: string[];
@@ -855,6 +864,39 @@ interface Transformer<I = any, O = any> {
855
864
  writableType?: undefined;
856
865
  }
857
866
 
867
+ interface URLPatternComponentResult {
868
+ groups?: Record<string, string | undefined>;
869
+ input?: string;
870
+ }
871
+
872
+ interface URLPatternInit {
873
+ baseURL?: string;
874
+ hash?: string;
875
+ hostname?: string;
876
+ password?: string;
877
+ pathname?: string;
878
+ port?: string;
879
+ protocol?: string;
880
+ search?: string;
881
+ username?: string;
882
+ }
883
+
884
+ interface URLPatternOptions {
885
+ ignoreCase?: boolean;
886
+ }
887
+
888
+ interface URLPatternResult {
889
+ hash?: URLPatternComponentResult;
890
+ hostname?: URLPatternComponentResult;
891
+ inputs?: URLPatternInput[];
892
+ password?: URLPatternComponentResult;
893
+ pathname?: URLPatternComponentResult;
894
+ port?: URLPatternComponentResult;
895
+ protocol?: URLPatternComponentResult;
896
+ search?: URLPatternComponentResult;
897
+ username?: URLPatternComponentResult;
898
+ }
899
+
858
900
  interface UnderlyingByteSource {
859
901
  autoAllocateChunkSize?: number;
860
902
  cancel?: UnderlyingSourceCancelCallback;
@@ -2778,7 +2820,7 @@ declare var CryptoKey: {
2778
2820
  };
2779
2821
 
2780
2822
  /**
2781
- * The **`CustomEvent`** interface represents events initialized by an application for any purpose.
2823
+ * The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
2782
2824
  *
2783
2825
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
2784
2826
  */
@@ -7622,57 +7664,6 @@ interface ReadableStreamGenericReader {
7622
7664
  cancel(reason?: any): Promise<void>;
7623
7665
  }
7624
7666
 
7625
- /**
7626
- * The `Report` interface of the Reporting API represents a single report.
7627
- *
7628
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report)
7629
- */
7630
- interface Report {
7631
- /**
7632
- * 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.
7633
- *
7634
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/body)
7635
- */
7636
- readonly body: ReportBody | null;
7637
- /**
7638
- * The **`type`** read-only property of the Report interface returns the type of report generated, e.g., `deprecation` or `intervention`.
7639
- *
7640
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/type)
7641
- */
7642
- readonly type: string;
7643
- /**
7644
- * The **`url`** read-only property of the Report interface returns the URL of the document that generated the report.
7645
- *
7646
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/url)
7647
- */
7648
- readonly url: string;
7649
- toJSON(): any;
7650
- }
7651
-
7652
- declare var Report: {
7653
- prototype: Report;
7654
- new(): Report;
7655
- };
7656
-
7657
- /**
7658
- * The **`ReportBody`** interface of the Reporting API represents the body of a report.
7659
- *
7660
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody)
7661
- */
7662
- interface ReportBody {
7663
- /**
7664
- * The **`toJSON()`** method of the ReportBody interface is a _serializer_, and returns a JSON representation of the `ReportBody` object.
7665
- *
7666
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody/toJSON)
7667
- */
7668
- toJSON(): any;
7669
- }
7670
-
7671
- declare var ReportBody: {
7672
- prototype: ReportBody;
7673
- new(): ReportBody;
7674
- };
7675
-
7676
7667
  /**
7677
7668
  * The `ReportingObserver` interface of the Reporting API allows you to collect and access reports.
7678
7669
  *
@@ -8022,7 +8013,7 @@ interface ServiceWorkerContainerEventMap {
8022
8013
  */
8023
8014
  interface ServiceWorkerContainer extends EventTarget {
8024
8015
  /**
8025
- * 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.
8016
+ * 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.
8026
8017
  *
8027
8018
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/controller)
8028
8019
  */
@@ -8449,7 +8440,7 @@ declare var SubtleCrypto: {
8449
8440
  };
8450
8441
 
8451
8442
  /**
8452
- * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
8443
+ * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
8453
8444
  *
8454
8445
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
8455
8446
  */
@@ -8504,19 +8495,19 @@ declare var TextDecoderStream: {
8504
8495
  };
8505
8496
 
8506
8497
  /**
8507
- * The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
8498
+ * The **`TextEncoder`** interface enables you to character encoding a JavaScript string using UTF-8.
8508
8499
  *
8509
8500
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
8510
8501
  */
8511
8502
  interface TextEncoder extends TextEncoderCommon {
8512
8503
  /**
8513
- * 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.
8504
+ * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the string character encoding using UTF-8.
8514
8505
  *
8515
8506
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
8516
8507
  */
8517
8508
  encode(input?: string): Uint8Array;
8518
8509
  /**
8519
- * 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.
8510
+ * 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.
8520
8511
  *
8521
8512
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
8522
8513
  */
@@ -8815,6 +8806,86 @@ declare var URL: {
8815
8806
  revokeObjectURL(url: string): void;
8816
8807
  };
8817
8808
 
8809
+ /**
8810
+ * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern.
8811
+ *
8812
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
8813
+ */
8814
+ interface URLPattern {
8815
+ /**
8816
+ * 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.
8817
+ *
8818
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
8819
+ */
8820
+ readonly hasRegExpGroups: boolean;
8821
+ /**
8822
+ * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
8823
+ *
8824
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
8825
+ */
8826
+ readonly hash: string;
8827
+ /**
8828
+ * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
8829
+ *
8830
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
8831
+ */
8832
+ readonly hostname: string;
8833
+ /**
8834
+ * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
8835
+ *
8836
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
8837
+ */
8838
+ readonly password: string;
8839
+ /**
8840
+ * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
8841
+ *
8842
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
8843
+ */
8844
+ readonly pathname: string;
8845
+ /**
8846
+ * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
8847
+ *
8848
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
8849
+ */
8850
+ readonly port: string;
8851
+ /**
8852
+ * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
8853
+ *
8854
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
8855
+ */
8856
+ readonly protocol: string;
8857
+ /**
8858
+ * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
8859
+ *
8860
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
8861
+ */
8862
+ readonly search: string;
8863
+ /**
8864
+ * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
8865
+ *
8866
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
8867
+ */
8868
+ readonly username: string;
8869
+ /**
8870
+ * 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.
8871
+ *
8872
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
8873
+ */
8874
+ exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
8875
+ /**
8876
+ * 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.
8877
+ *
8878
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
8879
+ */
8880
+ test(input?: URLPatternInput, baseURL?: string | URL): boolean;
8881
+ }
8882
+
8883
+ declare var URLPattern: {
8884
+ prototype: URLPattern;
8885
+ new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern;
8886
+ new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
8887
+ };
8888
+
8818
8889
  /**
8819
8890
  * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
8820
8891
  *
@@ -13039,6 +13110,7 @@ type RequestInfo = Request | string;
13039
13110
  type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame;
13040
13111
  type TimerHandler = string | Function;
13041
13112
  type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer;
13113
+ type URLPatternInput = string | URLPatternInit;
13042
13114
  type Uint32List = Uint32Array | GLuint[];
13043
13115
  type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
13044
13116
  type AlphaOption = "discard" | "keep";
package/ts5.6/index.d.ts CHANGED
@@ -717,6 +717,15 @@ interface RegistrationOptions {
717
717
  updateViaCache?: ServiceWorkerUpdateViaCache;
718
718
  }
719
719
 
720
+ interface Report {
721
+ body?: ReportBody | null;
722
+ type?: string;
723
+ url?: string;
724
+ }
725
+
726
+ interface ReportBody {
727
+ }
728
+
720
729
  interface ReportingObserverOptions {
721
730
  buffered?: boolean;
722
731
  types?: string[];
@@ -855,6 +864,39 @@ interface Transformer<I = any, O = any> {
855
864
  writableType?: undefined;
856
865
  }
857
866
 
867
+ interface URLPatternComponentResult {
868
+ groups?: Record<string, string | undefined>;
869
+ input?: string;
870
+ }
871
+
872
+ interface URLPatternInit {
873
+ baseURL?: string;
874
+ hash?: string;
875
+ hostname?: string;
876
+ password?: string;
877
+ pathname?: string;
878
+ port?: string;
879
+ protocol?: string;
880
+ search?: string;
881
+ username?: string;
882
+ }
883
+
884
+ interface URLPatternOptions {
885
+ ignoreCase?: boolean;
886
+ }
887
+
888
+ interface URLPatternResult {
889
+ hash?: URLPatternComponentResult;
890
+ hostname?: URLPatternComponentResult;
891
+ inputs?: URLPatternInput[];
892
+ password?: URLPatternComponentResult;
893
+ pathname?: URLPatternComponentResult;
894
+ port?: URLPatternComponentResult;
895
+ protocol?: URLPatternComponentResult;
896
+ search?: URLPatternComponentResult;
897
+ username?: URLPatternComponentResult;
898
+ }
899
+
858
900
  interface UnderlyingByteSource {
859
901
  autoAllocateChunkSize?: number;
860
902
  cancel?: UnderlyingSourceCancelCallback;
@@ -2778,7 +2820,7 @@ declare var CryptoKey: {
2778
2820
  };
2779
2821
 
2780
2822
  /**
2781
- * The **`CustomEvent`** interface represents events initialized by an application for any purpose.
2823
+ * The **`CustomEvent`** interface can be used to attach custom data to an event generated by an application.
2782
2824
  *
2783
2825
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
2784
2826
  */
@@ -7622,57 +7664,6 @@ interface ReadableStreamGenericReader {
7622
7664
  cancel(reason?: any): Promise<void>;
7623
7665
  }
7624
7666
 
7625
- /**
7626
- * The `Report` interface of the Reporting API represents a single report.
7627
- *
7628
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report)
7629
- */
7630
- interface Report {
7631
- /**
7632
- * 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.
7633
- *
7634
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/body)
7635
- */
7636
- readonly body: ReportBody | null;
7637
- /**
7638
- * The **`type`** read-only property of the Report interface returns the type of report generated, e.g., `deprecation` or `intervention`.
7639
- *
7640
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/type)
7641
- */
7642
- readonly type: string;
7643
- /**
7644
- * The **`url`** read-only property of the Report interface returns the URL of the document that generated the report.
7645
- *
7646
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/url)
7647
- */
7648
- readonly url: string;
7649
- toJSON(): any;
7650
- }
7651
-
7652
- declare var Report: {
7653
- prototype: Report;
7654
- new(): Report;
7655
- };
7656
-
7657
- /**
7658
- * The **`ReportBody`** interface of the Reporting API represents the body of a report.
7659
- *
7660
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody)
7661
- */
7662
- interface ReportBody {
7663
- /**
7664
- * The **`toJSON()`** method of the ReportBody interface is a _serializer_, and returns a JSON representation of the `ReportBody` object.
7665
- *
7666
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody/toJSON)
7667
- */
7668
- toJSON(): any;
7669
- }
7670
-
7671
- declare var ReportBody: {
7672
- prototype: ReportBody;
7673
- new(): ReportBody;
7674
- };
7675
-
7676
7667
  /**
7677
7668
  * The `ReportingObserver` interface of the Reporting API allows you to collect and access reports.
7678
7669
  *
@@ -8022,7 +8013,7 @@ interface ServiceWorkerContainerEventMap {
8022
8013
  */
8023
8014
  interface ServiceWorkerContainer extends EventTarget {
8024
8015
  /**
8025
- * 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.
8016
+ * 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.
8026
8017
  *
8027
8018
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/controller)
8028
8019
  */
@@ -8449,7 +8440,7 @@ declare var SubtleCrypto: {
8449
8440
  };
8450
8441
 
8451
8442
  /**
8452
- * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
8443
+ * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, or `GBK`.
8453
8444
  *
8454
8445
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
8455
8446
  */
@@ -8504,19 +8495,19 @@ declare var TextDecoderStream: {
8504
8495
  };
8505
8496
 
8506
8497
  /**
8507
- * The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
8498
+ * The **`TextEncoder`** interface enables you to character encoding a JavaScript string using UTF-8.
8508
8499
  *
8509
8500
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
8510
8501
  */
8511
8502
  interface TextEncoder extends TextEncoderCommon {
8512
8503
  /**
8513
- * 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.
8504
+ * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the string character encoding using UTF-8.
8514
8505
  *
8515
8506
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
8516
8507
  */
8517
8508
  encode(input?: string): Uint8Array;
8518
8509
  /**
8519
- * 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.
8510
+ * 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.
8520
8511
  *
8521
8512
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
8522
8513
  */
@@ -8815,6 +8806,86 @@ declare var URL: {
8815
8806
  revokeObjectURL(url: string): void;
8816
8807
  };
8817
8808
 
8809
+ /**
8810
+ * The **`URLPattern`** interface of the URL Pattern API matches URLs or parts of URLs against a pattern.
8811
+ *
8812
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern)
8813
+ */
8814
+ interface URLPattern {
8815
+ /**
8816
+ * 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.
8817
+ *
8818
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hasRegExpGroups)
8819
+ */
8820
+ readonly hasRegExpGroups: boolean;
8821
+ /**
8822
+ * The **`hash`** read-only property of the URLPattern interface is a string containing the pattern used to match the fragment part of a URL.
8823
+ *
8824
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hash)
8825
+ */
8826
+ readonly hash: string;
8827
+ /**
8828
+ * The **`hostname`** read-only property of the URLPattern interface is a string containing the pattern used to match the hostname part of a URL.
8829
+ *
8830
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/hostname)
8831
+ */
8832
+ readonly hostname: string;
8833
+ /**
8834
+ * The **`password`** read-only property of the URLPattern interface is a string containing the pattern used to match the password part of a URL.
8835
+ *
8836
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/password)
8837
+ */
8838
+ readonly password: string;
8839
+ /**
8840
+ * The **`pathname`** read-only property of the URLPattern interface is a string containing the pattern used to match the pathname part of a URL.
8841
+ *
8842
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/pathname)
8843
+ */
8844
+ readonly pathname: string;
8845
+ /**
8846
+ * The **`port`** read-only property of the URLPattern interface is a string containing the pattern used to match the port part of a URL.
8847
+ *
8848
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/port)
8849
+ */
8850
+ readonly port: string;
8851
+ /**
8852
+ * The **`protocol`** read-only property of the URLPattern interface is a string containing the pattern used to match the protocol part of a URL.
8853
+ *
8854
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/protocol)
8855
+ */
8856
+ readonly protocol: string;
8857
+ /**
8858
+ * The **`search`** read-only property of the URLPattern interface is a string containing the pattern used to match the search part of a URL.
8859
+ *
8860
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/search)
8861
+ */
8862
+ readonly search: string;
8863
+ /**
8864
+ * The **`username`** read-only property of the URLPattern interface is a string containing the pattern used to match the username part of a URL.
8865
+ *
8866
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/username)
8867
+ */
8868
+ readonly username: string;
8869
+ /**
8870
+ * 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.
8871
+ *
8872
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/exec)
8873
+ */
8874
+ exec(input?: URLPatternInput, baseURL?: string | URL): URLPatternResult | null;
8875
+ /**
8876
+ * 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.
8877
+ *
8878
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLPattern/test)
8879
+ */
8880
+ test(input?: URLPatternInput, baseURL?: string | URL): boolean;
8881
+ }
8882
+
8883
+ declare var URLPattern: {
8884
+ prototype: URLPattern;
8885
+ new(input: URLPatternInput, baseURL: string | URL, options?: URLPatternOptions): URLPattern;
8886
+ new(input?: URLPatternInput, options?: URLPatternOptions): URLPattern;
8887
+ };
8888
+
8818
8889
  /**
8819
8890
  * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
8820
8891
  *
@@ -13039,6 +13110,7 @@ type RequestInfo = Request | string;
13039
13110
  type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame;
13040
13111
  type TimerHandler = string | Function;
13041
13112
  type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | MediaSourceHandle | ReadableStream | WritableStream | TransformStream | AudioData | VideoFrame | RTCDataChannel | ArrayBuffer;
13113
+ type URLPatternInput = string | URLPatternInit;
13042
13114
  type Uint32List = Uint32Array | GLuint[];
13043
13115
  type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
13044
13116
  type AlphaOption = "discard" | "keep";