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
+31-4Lines changed: 31 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,18 +51,45 @@ The common steps to send a pull request are:
51
51
3. Update the files in the `baselines` folder using the newly generated files
52
52
under `generated` folder (`npm run baseline-accept`).
53
53
54
-
### When should a DOM API be included here?
54
+
### What are the TypeScript team's heuristics for PRs to the DOM APIs
55
55
56
-
A feature is considered highly experimental if a DOM API lacks multiple implementations or a formal specification from W3C or WHATWG. Such a feature belongs on [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped#readme).
57
-
When it gets multiple implementations and a proper specification, it can be added here and removed from DefinitelyTyped.
56
+
Changes to this repo can have pretty drastic ecosystem effects, because these types are included by default in TypeScript.
57
+
Due to this, we tend to be quite conservative with our approach to introducing changes.
58
+
To give you a sense of whether we will accept changes, you can use these heuristics to know up-front if we'll be open to merging.
58
59
60
+
#### Fixes
61
+
62
+
> For example, changing a type on a field, or nullability references
63
+
64
+
- Does the PR show examples of the changes being used in spec examples or reputable websites like MDN?
65
+
- Did this change come from an IDL update?
66
+
- Does the change appear to be high-impact on a well-used API?
67
+
68
+
#### Additions
69
+
70
+
> For example, adding a new spec or subsection via a new or updated IDL file
71
+
72
+
- Does the new objects or fields show up in [mdn/browser-compat-data](https://github.com/mdn/browser-compat-data)? If not, it's likely too soon
73
+
- What stage of the [W3C process](https://en.wikipedia.org/wiki/World_Wide_Web_Consortium#Specification_maturation) is the proposal for these changes: We aim for Proposed recommendation, but can accept Candidate recommendation for stable looking proposals.
74
+
- Are the additions available in at least two of Firefox, Safari and Chromium?
75
+
- Could any types added at the global scope have naming conflicts?
76
+
- Are the features going to be used by a lot of people?
77
+
78
+
#### Removals
79
+
80
+
> For example, removing a browser-specific section of code
81
+
82
+
- Do the remove objects or fields show up in [mdn/browser-compat-data](https://github.com/mdn/browser-compat-data)? If so, are they marked as deprecated?
83
+
- Does an internet search for the fields show results in blogs/recommendations?
84
+
- When was the deprecation (this can be hard to find) but was it at least 2 years ago if so?
85
+
86
+
# This repo
59
87
60
88
## Code Structure
61
89
62
90
-`src/index.ts`: handles the emitting of the `.d.ts` files.
63
91
-`src/test.ts`: verifies the output by comparing the `generated/` and `baseline/` contents.
64
92
65
-
66
93
## Input Files
67
94
68
95
-`browser.webidl.preprocessed.json`: a JSON file generated by Microsoft Edge. **Do not edit this file**.
0 commit comments