Closed
Description
Bug Report
Go To Type Definition fails if the identifier is a type name. This is confusing. Instead, Go to Type Definition should navigate to the declaration of the type.
I'm filing this bug as requested by @weswigham in #6209 (comment)
🔎 Search Terms
Go To Type Definition
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about Go to Type Definition
⏯ Playground Link
This issue cannot be reproduced in TS Playground because the "Go to Type Definition" context menu is not available in the Playground.
However, reproducing it in VSCode is trivial.
💻 Code
type T = string;
const x: T;
// in VS Code, right click on the second `T` and choose "Go To Type Definition"
🙁 Actual behavior
🙂 Expected behavior
Navigates to the declaration of T