Microsoft/TypeScript

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

Open

#44,038 opened on May 11, 2021

View on GitHub
 (5 comments) (0 reactions) (0 assignees)TypeScript (6,726 forks)batch import
Experience EnhancementHelp WantedSuggestion

Repository metrics

Stars
 (48,455 stars)
PR merge metrics
 (Avg merge 6d 17h) (9 merged PRs in 30d)

Description

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 {

Contributor guide