@types/web 0.0.37 → 0.0.38

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.37 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.37.
50
+ You can read what changed in version 0.0.38 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.38.
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
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "MIT",
6
6
  "contributors": [],