Skip to content

Commit 38ce89c

Browse files
authored
Merge pull request #658 from saschanaz/patch-1
Update contribution guidelines
2 parents 441a645 + 6f9cf28 commit 38ce89c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ The `dom.generated.d.ts`, `webworker.generated.d.ts` and `dom.iterable.generated
3131
For each pull request, we will run the script and compare the generated files with the baseline files.
3232
In order to make the tests pass, please update the baseline as well in any pull requests.
3333

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.
3540
There are three json files that are typically used to alter the type generation: `addedTypes.json`, `overridingTypes.json`, and `removedTypes.json`.
3641
`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.
3843

3944
The format of each file can be inferred from their existing content.
4045

0 commit comments

Comments
 (0)