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

also return classes when caling goToDef on a constructor call #59421

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

iisaduan
Copy link
Member

@iisaduan iisaduan commented Jul 25, 2024

When requesting definition on a non-extended class,

class Foo {
    /*
     * possibly a lot of code
     */
    constructor()
}
const foo = new /*goToDefinition*/Foo()

we now also return the class definition, in addition to the constructor.

Described here/generated by/inspired by #59241 (comment) (related #59241)

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jul 25, 2024
@iisaduan
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 25, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
pack this ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 25, 2024

Hey @iisaduan, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/162998/artifacts?artifactName=tgz&fileId=7DE9648C7F751707796B5E77093981F7A33721F01A855CD665995CAC675C952F02&fileName=/typescript-5.6.0-insiders.20240725.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/[email protected]".;

Copy link
Member

@RyanCavanaugh RyanCavanaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after a couple nits

src/services/goToDefinition.ts Outdated Show resolved Hide resolved
src/services/goToDefinition.ts Outdated Show resolved Hide resolved
@iisaduan iisaduan merged commit 26c4320 into microsoft:main Aug 16, 2024
32 checks passed
@iisaduan iisaduan deleted the goTo-classConstructor branch August 16, 2024 21:12
@iisaduan iisaduan mentioned this pull request Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants