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

types: improve goto definition for inferred schema definitions #14968

Merged

Conversation

forivall
Copy link
Contributor

Summary

Improve Go to Definition for inferred schema definitions

Examples

In schema.test.ts, add a type alias such as

  type InferredSchemaDecimal2 = InferredTestSchemaType['decimal2'];

Without this change, using "Go to Definition" does not work, and the typescript language service reports "No definition found". With this change, "Go to Definition" navigates directly to the definition in the schema.

Kapture.2024-10-16.at.12.32.10.webm

I don't think there's a way to test for this with tsd, you just need to know the pattern to make it work nicely.

Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@vkarpov15 vkarpov15 added this to the 8.7.3 milestone Oct 20, 2024
@vkarpov15 vkarpov15 merged commit 925327f into Automattic:master Oct 20, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants