Skip to content

For checkJS, error when JSDoc @see tag text starts with [ #44958

@jaydenseric

Description

@jaydenseric

Bug Report

In a JS file with TS checking enabled, JSDoc @see tag text content that begins with [ (e.g. when the text content is a markdown link) incorrectly results in a TS error Identifier expected. at the [.

🔎 Search Terms

jsdoc @see tag Identifier expected

🕗 Version & Regression Information

Error seen in v4.1.5 and v4.3.5; probably the bug exists in every version so far that parses JSDoc @see tags.

⏯ Playground Link

// @checkJs
// @filename: a.js

/**
 * @see [TypeScript docs](https://www.typescriptlang.org/docs).
 */

Workbench Repro

💻 Code

In a.js:

// @ts-check

/**
 * @see [TypeScript docs](https://www.typescriptlang.org/docs).
 */

🙁 Actual behavior

TS error Identifier expected. at the opening [ of the JSDoc @see tag markdown text.

🙂 Expected behavior

No TS error.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions