Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS v5.4.2 errors on referencing a property delete in JSDoc @link or @linkcode #57738

Closed
jaydenseric opened this issue Mar 12, 2024 · 2 comments · Fixed by #57739
Closed

TS v5.4.2 errors on referencing a property delete in JSDoc @link or @linkcode #57738

jaydenseric opened this issue Mar 12, 2024 · 2 comments · Fixed by #57739
Labels
Bug A bug in TypeScript Help Wanted You can do this

Comments

@jaydenseric
Copy link

🔎 Search Terms

"jsdoc link keyword delete", "Identifier expected. 'delete' is a reserved word that cannot be used here. ts(1359)"

🕗 Version & Regression Information

  • This changed between versions 5.3.3 and 5.4.2

The bug was not present in TS v5.3.3; upgrading to v5.4.2 exhibits the problem.

⏯ Playground Link

https://www.typescriptlang.org/play?moduleResolution=99&target=99&jsx=0&module=199&ssl=3&ssc=26&pln=1&pc=1&filetype=js#code/PTAEAEBcGcFoGMAWBTeBrAUB4AqHoBvcAGwEsA7NUAWQEMAHAOgBNljlJkBfUHYIA

💻 Code

// @ts-check

/** {@link Map.delete} */

🙁 Actual behavior

A TypeScript error on the delete in the JSDoc @link:

Identifier expected. 'delete' is a reserved word that cannot be used here. ts(1359)

🙂 Expected behavior

No TypeScript error, and the delete in the JSDoc @link should have hover information.

Additional information about the issue

Mentioned this bug here:

#53111 (comment)

graphql-react users who upgrade TypeScript in their projects to v5.4.2 suddenly start seeing TypeScript errors wherever imported graphql-react modules have a JSDoc @link referencing a property delete, e.g:

https://github.com/jaydenseric/graphql-react/blob/5525aca4e5ba5aad5115e56de92bf5ab4acbd2c9/cacheDelete.mjs#L11

@Andarist
Copy link
Contributor

Bisects to #56338

@jaydenseric
Copy link
Author

This was closed accidentally by a private GitHub repo commit having the description:

TypeScript can’t be updated yet until this bug is fixed:

https://github.com/microsoft/TypeScript/issues/57738

With fixed: before the issue link.

@jaydenseric jaydenseric reopened this Mar 18, 2024
jaydenseric added a commit to jaydenseric/graphql-react that referenced this issue Apr 10, 2024
Includes fixes for the newer versions of Prettier, ESLint, and TypeScript.

Note that there are now 3 TypeScript errors due to this TypeScript v5.4.2 bug:

microsoft/TypeScript#57738
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants