Currently, "go to implementation" on a type functionality for typescript code in VSCode will go to places where an object of this type is created. This works
interface Person {
name: string;
}
function f() {
const john: Person = { name: 'John' }; // both this type annotation and `as` syntaxes show these objects as implementations of `Person`
const andrew = { name: 'Andrew' } as Person;
const tyler = { name: 'Tyler' } satisfies Person; // this is not shown as an implementation of `Person`
}
📃 Motivating Example
Go to implementation is a very easy way to see who produces objects of a particular type.
satisfies marking a type to adhere to a particular type without creating a new variable using type annotation syntax.
💻 Use Cases
What do you want to use this for?
Identify implementations of a type.
What shortcomings exist with current approaches?
None I can think of.
What workarounds are you using in the meantime?
Going to references and reading code.
🔍 Search Terms
"satisfies", "go-to-implementation", "go to implementation", "implementation"
✅ Viability Checklist
⭐ Suggestion
Currently, "go to implementation" on a type functionality for typescript code in VSCode will go to places where an object of this type is created. This works
📃 Motivating Example
Go to implementation is a very easy way to see who produces objects of a particular type.
satisfies
marking a type to adhere to a particular type without creating a new variable using type annotation syntax.💻 Use Cases
What do you want to use this for? Identify implementations of a type.
What shortcomings exist with current approaches? None I can think of.
What workarounds are you using in the meantime? Going to references and reading code.