Microsoft/TypeScript
Some SVG types would benefit from stricter appendChild() overloads
開放
#4,178 建立於 2015年8月6日
Domain: lib.d.tsHelp WantedSuggestion
倉庫指標
- 星標
- (108,860 顆星)
- PR 合併指標
- (PR 指標待抓取)
描述
interface SVGFEComponentTransferElement {
appendChild(newChild: SVGFEFuncAElement): SVGFEFuncAElement;
appendChild(newChild: SVGFEFuncBElement): SVGFEFuncBElement;
appendChild(newChild: SVGFEFuncGElement): SVGFEFuncGElement;
appendChild(newChild: SVGFEFuncRElement): SVGFEFuncRElement;
appendChild(newChild: Comment): Comment;
}
interface SVGFEMergeElement {
appendChild(newChild: SVGFEMergeNodeElement): SVGFEMergeNodeElement;
appendChild(newChild: Comment): Comment;
}
...
to override the generic appendChild(Node) inherited from Node, and so on. This would make it an error to append a <g> to a <feMerge> for example.