Skip to content

Commit 3d29047

Browse files
authored
docs: restructure
1 parent be8fff5 commit 3d29047

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
# types-web
22

3+
Get types for the latest web APIs as soon as they become widely available!
4+
35
![An example showing types for MediaSession and MediaRecorder](docs/mediasession.png)
46

7+
[The default types generator](https://github.com/microsoft/TypeScript-DOM-lib-generator/) for TypeScript requires manual review for every update, and thus does not provide types for every latest API in a timely manner. `types-web` solves this issue by deploying automation by following tools:
8+
9+
* [`@mdn/browser-compat-data`](https://www.npmjs.com/package/@mdn/browser-compat-data) provides which features are supported by which browsers, so that undersupported features can be disabled automatically.
10+
* [`browser-specs`](https://www.npmjs.com/package/browser-specs) provides a full list of web specs, so that every latest feature can be covered.
11+
* [`webref`](https://github.com/w3c/webref) provides IDL code from the specs, so that the features can be properly typed.
12+
13+
See how many types have been added in the [changelog](CHANGELOG.md).
14+
515
## How to use
616

717
1. Install the package by [`npm i types-web`](https://www.npmjs.com/package/types-web).
@@ -25,18 +35,6 @@
2535
}
2636
```
2737

28-
## How is this different from [TypeScript-DOM-lib-generator](https://github.com/microsoft/TypeScript-DOM-lib-generator/)?
29-
30-
`types-web` tries automating everything with a set of relevant tools to reduce the hassle of manual reviewing:
31-
32-
* [`@mdn/browser-compat-data`](https://www.npmjs.com/package/@mdn/browser-compat-data) provides which features are supported by which browsers, so that undersupported features can be disabled automatically.
33-
* [`browser-specs`](https://www.npmjs.com/package/browser-specs) provides a full list of web specs, so that every latest feature can be covered.
34-
* [`webref`](https://github.com/w3c/webref) provides IDL code from the specs, so that the features can be properly typed.
35-
36-
But so far some things still need manual modification and that is done by files in `inputfiles/` directory.
37-
38-
See how many types have been added in the [changelog](CHANGELOG.md).
39-
4038
## Why not `@types`?
4139

4240
To maintain the package by myself without waiting for external reviews.
@@ -47,6 +45,10 @@ A feature needs to be supported by more than two major browser engines to be inc
4745

4846
If the condition is met but still is not available here, please [file an issue](https://github.com/saschanaz/types-web/issues/new).
4947

48+
## Is it fully automated?
49+
50+
Not yet. A small part of things still needs manual modification, which is done by files in `inputfiles/` directory.
51+
5052
## Build Instructions
5153

5254
* To get things setup:

0 commit comments

Comments
 (0)