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
+35-4Lines changed: 35 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -51,18 +51,49 @@ 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
+
- Would the changes introduce a lot of breaking changes to existing code? For example the large corpus of typed code in DefinitelyTyped.
68
+
69
+
#### Additions
70
+
71
+
> For example, adding a new spec or subsection via a new or updated IDL file
72
+
73
+
- 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.
74
+
- Is the IDL source from WHATWG?
75
+
- Are the additions available in at least two of Firefox, Safari and Chromium?
76
+
- Is the IDL source from W3C?
77
+
- 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.
78
+
- If it's at Working draft the additions available in all three of Firefox, Safari and Chromium
79
+
- Could any types added at the global scope have naming conflicts?
80
+
- Are the new features going to be used by a lot of people?
81
+
82
+
#### Removals
83
+
84
+
> For example, removing a browser-specific section of code
85
+
86
+
- Do the removed objects or fields show up in [mdn/browser-compat-data](https://github.com/mdn/browser-compat-data)? If so, are they marked as deprecated?
87
+
- Does an internet search for the fields show results in blogs/recommendations?
88
+
- When was the deprecation (this can be hard to find) but was it at least 2 years ago if so?
89
+
90
+
# This repo
59
91
60
92
## Code Structure
61
93
62
94
-`src/index.ts`: handles the emitting of the `.d.ts` files.
63
95
-`src/test.ts`: verifies the output by comparing the `generated/` and `baseline/` contents.
64
96
65
-
66
97
## Input Files
67
98
68
99
-`browser.webidl.preprocessed.json`: a JSON file generated by Microsoft Edge. **Do not edit this file**.
0 commit comments