@types/web 0.0.64 → 0.0.67

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +31 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -47,4 +47,4 @@ Prior to `@types/web` the web APIs were deployed with a version of TypeScript, a
47
47
 
48
48
  ## Deploy Metadata
49
49
 
50
- You can read what changed in version 0.0.64 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.64.
50
+ You can read what changed in version 0.0.67 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.67.
package/index.d.ts CHANGED
@@ -1788,6 +1788,19 @@ interface UnderlyingSource<R = any> {
1788
1788
  type?: undefined;
1789
1789
  }
1790
1790
 
1791
+ interface ValidityStateFlags {
1792
+ badInput?: boolean;
1793
+ customError?: boolean;
1794
+ patternMismatch?: boolean;
1795
+ rangeOverflow?: boolean;
1796
+ rangeUnderflow?: boolean;
1797
+ stepMismatch?: boolean;
1798
+ tooLong?: boolean;
1799
+ tooShort?: boolean;
1800
+ typeMismatch?: boolean;
1801
+ valueMissing?: boolean;
1802
+ }
1803
+
1791
1804
  interface VideoColorSpaceInit {
1792
1805
  fullRange?: boolean;
1793
1806
  matrix?: VideoMatrixCoefficients;
@@ -3751,6 +3764,7 @@ declare var CustomEvent: {
3751
3764
 
3752
3765
  /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
3753
3766
  interface DOMException extends Error {
3767
+ /** @deprecated */
3754
3768
  readonly code: number;
3755
3769
  readonly message: string;
3756
3770
  readonly name: string;
@@ -4953,14 +4967,24 @@ interface ElementInternals extends ARIAMixin {
4953
4967
  readonly labels: NodeList;
4954
4968
  /** Returns the ShadowRoot for internals's target element, if the target element is a shadow host, or null otherwise. */
4955
4969
  readonly shadowRoot: ShadowRoot | null;
4970
+ /** Returns the error message that would be shown to the user if internals's target element was to be checked for validity. */
4971
+ readonly validationMessage: string;
4972
+ /** Returns the ValidityState object for internals's target element. */
4973
+ readonly validity: ValidityState;
4956
4974
  /** Returns true if internals's target element will be validated when the form is submitted; false otherwise. */
4957
4975
  readonly willValidate: boolean;
4976
+ /** Returns true if internals's target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case. */
4977
+ checkValidity(): boolean;
4978
+ /** Returns true if internals's target element has no validity problems; otherwise, returns false, fires an invalid event at the element, and (if the event isn't canceled) reports the problem to the user. */
4979
+ reportValidity(): boolean;
4958
4980
  /**
4959
4981
  * Sets both the state and submission value of internals's target element to value.
4960
4982
  *
4961
4983
  * If value is null, the element won't participate in form submission.
4962
4984
  */
4963
4985
  setFormValue(value: File | string | FormData | null, state?: File | string | FormData | null): void;
4986
+ /** Marks internals's target element as suffering from the constraints indicated by the flags argument, and sets the element's validation message to message. If anchor is specified, the user agent might use it to indicate problems with the constraints of internals's target element when the form owner is validated interactively or reportValidity() is called. */
4987
+ setValidity(flags?: ValidityStateFlags, message?: string, anchor?: HTMLElement): void;
4964
4988
  }
4965
4989
 
4966
4990
  declare var ElementInternals: {
@@ -10840,6 +10864,7 @@ declare var PushManager: {
10840
10864
  */
10841
10865
  interface PushSubscription {
10842
10866
  readonly endpoint: string;
10867
+ readonly expirationTime: EpochTimeStamp | null;
10843
10868
  readonly options: PushSubscriptionOptions;
10844
10869
  getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
10845
10870
  toJSON(): PushSubscriptionJSON;
@@ -16648,8 +16673,8 @@ interface WindowOrWorkerGlobalScope {
16648
16673
  readonly performance: Performance;
16649
16674
  atob(data: string): string;
16650
16675
  btoa(data: string): string;
16651
- clearInterval(id?: number): void;
16652
- clearTimeout(id?: number): void;
16676
+ clearInterval(id: number | undefined): void;
16677
+ clearTimeout(id: number | undefined): void;
16653
16678
  createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
16654
16679
  createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
16655
16680
  fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
@@ -16721,6 +16746,7 @@ declare var WritableStream: {
16721
16746
 
16722
16747
  /** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
16723
16748
  interface WritableStreamDefaultController {
16749
+ readonly signal: AbortSignal;
16724
16750
  error(e?: any): void;
16725
16751
  }
16726
16752
 
@@ -17955,8 +17981,8 @@ declare var origin: string;
17955
17981
  declare var performance: Performance;
17956
17982
  declare function atob(data: string): string;
17957
17983
  declare function btoa(data: string): string;
17958
- declare function clearInterval(id?: number): void;
17959
- declare function clearTimeout(id?: number): void;
17984
+ declare function clearInterval(id: number | undefined): void;
17985
+ declare function clearTimeout(id: number | undefined): void;
17960
17986
  declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
17961
17987
  declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
17962
17988
  declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
@@ -18005,7 +18031,7 @@ type GLuint64 = number;
18005
18031
  type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement;
18006
18032
  type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement;
18007
18033
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
18008
- type HeadersInit = string[][] | Record<string, string> | Headers;
18034
+ type HeadersInit = [string, string][] | Record<string, string> | Headers;
18009
18035
  type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
18010
18036
  type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
18011
18037
  type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.64",
3
+ "version": "0.0.67",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "MIT",
6
6
  "contributors": [],