Microsoft/TypeScript

lib.dom.d.ts should escape html elements in jsdoc comments

Open

#44,038 建立於 2021年5月11日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)TypeScript (6,726 fork)batch import
Experience EnhancementHelp WantedSuggestion

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

lib Update Request

Configuration Check

My compilation target is ES2020 and my lib is the default.

Missing / Incorrect Definition

For html elements such as HTMLScriptElement, the JSDoc includes <script>. This causes VS Code to drop the entire body of the comment

Sample Code

const a: HTMLScriptElement // hover over HTMLScriptElement

Proposal

These JSDoc comments should escape any html in the comments. I suggest using markdown inline code instead:

/** HTML `<script>` elements expose the HTMLScriptElement interface ... */
interface HTMLScriptElement extends HTMLElement {

貢獻者指南