Skip to content

Commit 593bce1

Browse files
author
Orta
authored
Merge pull request #828 from microsoft/readme
Add potential hueristics for the README
2 parents 6124e74 + 62d1576 commit 593bce1

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

README.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,49 @@ The common steps to send a pull request are:
5151
3. Update the files in the `baselines` folder using the newly generated files
5252
under `generated` folder (`npm run baseline-accept`).
5353

54-
### When should a DOM API be included here?
54+
### What are the TypeScript team's heuristics for PRs to the DOM APIs
5555

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.
5859

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
5991

6092
## Code Structure
6193

6294
- `src/index.ts`: handles the emitting of the `.d.ts` files.
6395
- `src/test.ts`: verifies the output by comparing the `generated/` and `baseline/` contents.
6496

65-
6697
## Input Files
6798

6899
- `browser.webidl.preprocessed.json`: a JSON file generated by Microsoft Edge. **Do not edit this file**.

0 commit comments

Comments
 (0)