Microsoft/TypeScript

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

Aberta

#44.038 aberto em 11 de mai. de 2021

 (5 comentários) (0 reação) (0 responsável)TypeScript (13.395 forks)batch import
Experience EnhancementHelp WantedSuggestion

Métricas do repositório

Stars
 (108.860 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

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 {

Guia do colaborador