Skip to content

Poorly formed output with JSDoc typedef #63726

Description

@brettz9

🔎 Search Terms

jsdoc typedef

🕗 Version & Regression Information

  • This changed between versions ______ and _______
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about X (not sure what FAQ to review; the JSDoc docs say nothing of this)___
  • I was unable to test this on prior versions because _______

⏯ Playground Link

No response

💻 Code

In dist/index.d.ts:

git clone https://github.com/brettz9/eslint-config-ash-nazg.git
git branch bad-typedef-exports
pnpm i
pnpm tsc

🙁 Actual behavior

Error with poorly formed typedef output (asterisk embedded therein):

 export type Types = ("great-eye" | "sauron" | "saruman" | *   "polyglot" | "bare" | "node" | "browser" | *   "script" | "module" | *   "no-overrides" | *   "no-cypress" | "mocha" | *   "babel" | "third-party")[];

🙂 Expected behavior

No embedded asterisks.

Additional information about the issue

tested against 7.0.2

Metadata

Metadata

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