microsoft / microsoft/TypeScript

Provide lib for modern DOM

オープン
#21,150 コメント 6 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Domain: lib.d.ts Experience Enhancement Help Wanted Suggestion
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

This is basically a re-opening of #2910, which @mhegazy asked me to do.

Nowadays TS has the lib compiler option that allow users to selectively choose which core definitions to include or not based on their target.

It would be nice to add a new option similar to dom and dom.iterable for users targetting a modern DOM runtime. Not sure how to name this since W3C has moved from releases to a "living standard" model.

For example, the living standard includes interfaces ChildNode with methods after, before, remove and replaceWith; ParentNode with methods prepend and append.

Those methods have been in Firefox and Chrome for a long while, they're in preview in Edge (17035+).

They are very convenient and there's no reason a dev that targets modern browsers shouldn't be able to do "lib": "dom.living" and use them.

Unfortunately I am not sure if there's a list somewhere of all those new features... except going through the whole standard :(

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、含めるべき最新の DOM 機能の完全な集合と、"dom" および "dom.iterable" と並ぶ新しい選択可能な lib の名前を決定します。issue では例として ChildNode と ParentNode のメソッドに言及していますが、ファイルやテストは特定されていません。ユーザーが新しい lib を選択し、意図した最新の DOM 定義を使用できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
compilers
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。