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

Feature Request: Go to Implementation #790

Closed
doliver3 opened this issue Dec 20, 2015 · 3 comments
Closed

Feature Request: Go to Implementation #790

doliver3 opened this issue Dec 20, 2015 · 3 comments

Comments

@doliver3
Copy link

Hi,

Your 'Go to Declaration' feature when pressing F12 is awesome!

I'd like to request a 'Go to Implementation' feature as well. When you 'Go to Declaration' as currently implemented you often arrive at the typescript .d.ts file which has the function signature but not the actual implementation. It would be great if there were a different key combination that would go to the implementation or if the 'Go to Declaration feature' would offer a list to choose either the type definition or the implementation.

At the moment what I do to work around this is search for 'class or similar full project searches, but it would be really great to find the implementation immediately.

@basarat
Copy link
Member

basarat commented Dec 21, 2015

At the moment what I do to work around this is search for 'class or similar full project searches, but it would be really great to find the implementation immediately.

It might not be of much use in general projects because of TypeScript's type system being structural. e.g. The TypeScript source code has types declared in types.ts with constructors being just functions that return objects that conform to the interface. E.g. see Node creation : https://basarat.gitbooks.io/typescript/content/docs/compiler/parser-functions.html#node-creation in the typescript source 🌹

So there is no mention of implements Foo. I do understand the motiviation for implements Foo. Maybe raise an issue at Microsoft/TypeScript and link back here to see if they are willing to provide a language service endpoint so we don't have to write it 🌹

For finding stuff I generally use find references which is already supported 🌹

@doliver3
Copy link
Author

Ok, I've opened this related request to the Typescript team: microsoft/TypeScript#6209

I just tried Find References again in various combinations but it never does what this request is asking for which is to show the implementation of the type. It does show all places that the type is used but doesn't show the implementation of that type.

There is a implements keyword in Typescript itself for implementing interfaces, but I'm interested in more than just the implements keyword to know what interfaces are defined. I'd like to also be able to find those functions and classes which conform to the type.

@basarat
Copy link
Member

basarat commented Dec 22, 2015

I just tried Find References again in various combinations but it never does what this request is asking for which is to show the implementation of the type

Sorry. I misread the question. But your request on Microsoft/TypeScript is still the right way to go 🌹

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

No branches or pull requests

3 participants