[Guidelines Proposal] Change consensus requirements

Open
#2,290 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
documentation

Research direction

The issue names no source file or test; start with the contributor-guidelines section linked in the issue and review the current two-major-browser-engine requirement. Compare the proposed one-engine-plus-official-HTML-spec rule and the undefined-until-two-engines example with the discussion. Done means the project has agreed on and documented a revised consensus policy.

Written by the indexing model from the issue text.

Description

Problem

Current contributor guidelines requires 2 major browser engines to implement a new Web API for its definition to be added to TS DOM types. https://github.com/microsoft/TypeScript-DOM-lib-generator#why-is-my-fancy-api-still-not-available-here

Seeing as Blink possesses >75% of browser engine market share and is by FAR the quickest engine to implement new web standards and standard proposals, this requirement causes unnecessary hassle and possible runtime errors if manually defined types are incorrect.

For example: https://x.com/CodeWShreyans/status/2000710168980377885?s=20
The Web Navigation API was added to the HTML Spec in 2022, shortly followed by Blink's implementation later the same year. Webkit released their implementation 3 days ago, over 3 years after Blink. Gecko still does not support it.

Solution

Add types to TS when a standard is supported by one major browser engine AND published to the official HTML spec. However to encourage safe use, the type can be possibly undefined until implemented by two major browser engines.

For example:

interface Window {
  navigation: Navigation | undefined
}
Dominant language
TypeScript
Stars
740
Forks
474
Avg merge
2d 8h
Merged PRs (30d)
15

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/TypeScript-DOM-lib-generator

All issues in microsoft/TypeScript-DOM-lib-generator

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.