microsoft / microsoft/TypeScript
Overload missing from createElementNS
オープン
初心者向け
まだ誰も着手していません。
Domain: lib.d.ts
Possible Improvement
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
⚙ Compilation target
ESNext
⚙ Library
6.0.0
Missing / Incorrect Definition
overload is missing for the createElementNS in case provide "http://www.w3.org/1999/xhtml" as namespaceURI.
// missing createElementNS<K extends keyof HTMLElementTagNameMap>(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: K): HTMLElementTagNameMap[K];
createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement;
createElementNS<K extends keyof SVGElementTagNameMap>(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K];
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement;
createElementNS<K extends keyof MathMLElementTagNameMap>(namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: K): MathMLElementTagNameMap[K];
Sample Code
document.createElementNS("http://www.w3.org/1999/xhtml", 'div'); // HTMLElement instead of HTMLDivElement
Documentation Link
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Document.createElementNS の DOM ライブラリ宣言を見つけ、既存の名前空間固有の overload を比較します。issue に示されている不足している XHTML overload を追加し、その後、関連する TypeScript ライブラリまたはコンパイラのテストを実行して、"div" のような XHTML タグが HTMLElement ではなく HTMLDivElement として推論されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 75/100