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

Missing Go to definition links when accessing properties after jsdoc typecast #60562

Open
Ilanaya opened this issue Nov 22, 2024 · 0 comments
Open

Comments

@Ilanaya
Copy link

Ilanaya commented Nov 22, 2024

πŸ”Ž Search Terms

jsdoc typecast, typecast property access, jsdoc go to definition

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about jsdoc, typecast

⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.6.3&filetype=js#code/PQKhAIAEBcE8AcCmATRAzcBvT4B2BDAW0QC5wBnaAJwEtcBzcAXyfADEB7D8EYAKD4BjDrkrgOAIwBW4ALzhQEGAkRZOHVrwAUmJgEoA3H2DBwACQ4A3RFXAB3GtAAW4AAaDqAG1fjrt1+o+EoieHHbgyByI5LgA5NDgVIjC9Lg0AF6qzlkqEeh0jjQiQiJiklIAjHIKYFBwSGpcmsA6+gB0BMRGwqIJ5QBM1Yp1uZjqza16ANqxnYixALpGfEA

πŸ’» Code

/** @typedef {{ name: string }} Foo */

const obj = /** @type {Foo} */({});
// Hover with `ctrl` over `Foo` below doesn't recognize the type definition
const obj1 = /** @type {Foo} */({}).name;
const obj2 = /** @type {Foo} */({})['name'];

πŸ™ Actual behavior

Hovering over Foo with ctrl pressed doesn't recognize the type definition

πŸ™‚ Expected behavior

Hovering over Foo with ctrl pressed recognizes the type definition

Additional information about the issue

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant