You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,15 @@ The `dom.generated.d.ts`, `webworker.generated.d.ts` and `dom.iterable.generated
31
31
For each pull request, we will run the script and compare the generated files with the baseline files.
32
32
In order to make the tests pass, please update the baseline as well in any pull requests.
33
33
34
-
For common changes, it is sufficient to change the json files.
34
+
It's recommended to first check which spec the wrong type belongs to. Say we are to update `IntersectionObserver` which belongs to [`Intersection Observer`](https://www.w3.org/TR/intersection-observer/) spec, and then we can do:
35
+
36
+
1. First check we have the spec name `Intersection Observer` in `inputfiles/idlSources.json`. If not, add it.
37
+
2. Run `npm run fetch-idl "Intersection Observer" && num run build && npm run baseline-accept`.
38
+
39
+
If the above didn't fix the type issues, we can fix them via json files as a last resort.
35
40
There are three json files that are typically used to alter the type generation: `addedTypes.json`, `overridingTypes.json`, and `removedTypes.json`.
36
41
`comments.json` can used to add comments to the types.
37
-
Finally, `knownWorkerTypes.json` determine which types are available in a WebWorker environment.
42
+
Finally, `knownTypes.json` determine which types are available in a certain environment in case it couldn't be automatically determined.
38
43
39
44
The format of each file can be inferred from their existing content.
0 commit comments