@types/web 0.0.35 → 0.0.39

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
@@ -8,6 +8,20 @@ The APIs inside `@types/web` are [generated from](https://github.com/microsoft/T
8
8
 
9
9
  ## Installation
10
10
 
11
+ With TypeScript 4.5+ using [lib replacement](https://github.com/microsoft/TypeScript/pull/45771), you can swap the DOM lib with this dependency:
12
+
13
+ ```sh
14
+ pnpm add @typescript/lib-dom@npm:@types/web --save-dev
15
+ npm install @typescript/lib-dom@npm:@types/web --save-dev
16
+ yarn add @typescript/lib-dom@npm:@types/web --dev
17
+ ```
18
+
19
+ That's all.
20
+
21
+ <details>
22
+ <summary>TypeScript 4.4 and below</summary>
23
+
24
+ <br/>
11
25
  To use `@types/web` you need to do two things:
12
26
 
13
27
  1. Install the dependency: `npm install @types/web --save-dev`, `yarn add @types/web --dev` or `pnpm add @types/web --dev`.
@@ -17,7 +31,10 @@ To use `@types/web` you need to do two things:
17
31
  1. **Without "lib"** - You will need to add `"lib": []`. The value you want to add inside your lib should correlate to your [`"target"`](https://www.typescriptlang.org/tsconfig#target). For example if you had `"target": "es2017"`, then you would add `"lib": ["es2017"]`
18
32
  1. **With "lib"** - You should remove `"dom"`.
19
33
 
20
- That's all.
34
+ Removing `"dom"` gives @types/web the chance to provide the same set of global declarations. However, It's possible that your dependencies pull in the TypeScript DOM library, in which case you can either try to make that not happen, or use TypeScript 4.5 to systematically replace the library.
35
+
36
+ </details>
37
+
21
38
 
22
39
  ## SemVer
23
40
 
@@ -30,4 +47,4 @@ Prior to `@types/web` the web APIs were deployed with a version of TypeScript, a
30
47
 
31
48
  ## Deploy Metadata
32
49
 
33
- You can read what changed in version 0.0.35 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.35.
50
+ You can read what changed in version 0.0.39 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.39.
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference path="./index.iterable.d.ts" />
1
+ /// <reference path="./iterable.d.ts" />
2
2
 
3
3
  /////////////////////////////
4
4
  /// Window APIs
@@ -55,8 +55,8 @@ interface AnimationEventInit extends EventInit {
55
55
  }
56
56
 
57
57
  interface AnimationPlaybackEventInit extends EventInit {
58
- currentTime?: number | null;
59
- timelineTime?: number | null;
58
+ currentTime?: CSSNumberish | null;
59
+ timelineTime?: CSSNumberish | null;
60
60
  }
61
61
 
62
62
  interface AssignedNodesOptions {
@@ -1938,7 +1938,7 @@ interface AnimationEventMap {
1938
1938
  }
1939
1939
 
1940
1940
  interface Animation extends EventTarget {
1941
- currentTime: number | null;
1941
+ currentTime: CSSNumberish | null;
1942
1942
  effect: AnimationEffect | null;
1943
1943
  readonly finished: Promise<Animation>;
1944
1944
  id: string;
@@ -1950,7 +1950,7 @@ interface Animation extends EventTarget {
1950
1950
  playbackRate: number;
1951
1951
  readonly ready: Promise<Animation>;
1952
1952
  readonly replaceState: AnimationReplaceState;
1953
- startTime: number | null;
1953
+ startTime: CSSNumberish | null;
1954
1954
  timeline: AnimationTimeline | null;
1955
1955
  cancel(): void;
1956
1956
  commitStyles(): void;
@@ -2000,8 +2000,8 @@ interface AnimationFrameProvider {
2000
2000
  }
2001
2001
 
2002
2002
  interface AnimationPlaybackEvent extends Event {
2003
- readonly currentTime: number | null;
2004
- readonly timelineTime: number | null;
2003
+ readonly currentTime: CSSNumberish | null;
2004
+ readonly timelineTime: CSSNumberish | null;
2005
2005
  }
2006
2006
 
2007
2007
  declare var AnimationPlaybackEvent: {
@@ -2782,11 +2782,14 @@ interface CSSStyleDeclaration {
2782
2782
  gridAutoRows: string;
2783
2783
  gridColumn: string;
2784
2784
  gridColumnEnd: string;
2785
+ /** @deprecated This is a legacy alias of `columnGap`. */
2785
2786
  gridColumnGap: string;
2786
2787
  gridColumnStart: string;
2788
+ /** @deprecated This is a legacy alias of `gap`. */
2787
2789
  gridGap: string;
2788
2790
  gridRow: string;
2789
2791
  gridRowEnd: string;
2792
+ /** @deprecated This is a legacy alias of `rowGap`. */
2790
2793
  gridRowGap: string;
2791
2794
  gridRowStart: string;
2792
2795
  gridTemplate: string;
@@ -3025,15 +3028,15 @@ interface CSSStyleDeclaration {
3025
3028
  webkitBorderTopLeftRadius: string;
3026
3029
  /** @deprecated This is a legacy alias of `borderTopRightRadius`. */
3027
3030
  webkitBorderTopRightRadius: string;
3028
- /** @deprecated */
3031
+ /** @deprecated This is a legacy alias of `boxAlign`. */
3029
3032
  webkitBoxAlign: string;
3030
- /** @deprecated */
3033
+ /** @deprecated This is a legacy alias of `boxFlex`. */
3031
3034
  webkitBoxFlex: string;
3032
- /** @deprecated */
3035
+ /** @deprecated This is a legacy alias of `boxOrdinalGroup`. */
3033
3036
  webkitBoxOrdinalGroup: string;
3034
- /** @deprecated */
3037
+ /** @deprecated This is a legacy alias of `boxOrient`. */
3035
3038
  webkitBoxOrient: string;
3036
- /** @deprecated */
3039
+ /** @deprecated This is a legacy alias of `boxPack`. */
3037
3040
  webkitBoxPack: string;
3038
3041
  /** @deprecated This is a legacy alias of `boxShadow`. */
3039
3042
  webkitBoxShadow: string;
@@ -16554,7 +16557,8 @@ declare namespace WebAssembly {
16554
16557
 
16555
16558
  var CompileError: {
16556
16559
  prototype: CompileError;
16557
- new(): CompileError;
16560
+ new(message?: string): CompileError;
16561
+ (message?: string): CompileError;
16558
16562
  };
16559
16563
 
16560
16564
  interface Global {
@@ -16581,7 +16585,8 @@ declare namespace WebAssembly {
16581
16585
 
16582
16586
  var LinkError: {
16583
16587
  prototype: LinkError;
16584
- new(): LinkError;
16588
+ new(message?: string): LinkError;
16589
+ (message?: string): LinkError;
16585
16590
  };
16586
16591
 
16587
16592
  interface Memory {
@@ -16610,7 +16615,8 @@ declare namespace WebAssembly {
16610
16615
 
16611
16616
  var RuntimeError: {
16612
16617
  prototype: RuntimeError;
16613
- new(): RuntimeError;
16618
+ new(message?: string): RuntimeError;
16619
+ (message?: string): RuntimeError;
16614
16620
  };
16615
16621
 
16616
16622
  interface Table {
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.35",
3
+ "version": "0.0.39",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "MIT",
6
6
  "contributors": [],