-
Notifications
You must be signed in to change notification settings - Fork 734
Port 'go to type definition' tests #1883
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Ports and adds fourslash tests and baseline handling for "go to type definition" functionality, including scripting support and a new verification helper.
- Added numerous baseline .baseline.jsonc reference files for goToType scenarios.
- Implemented VerifyBaselineGoToTypeDefinition in fourslash test harness and extended the conversion script to generate corresponding Go test code.
- Added generated Go tests invoking the new type definition baseline verification; marked one JSDoc-related test as skipped and listed it in failing tests.
Reviewed Changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| testdata/baselines/reference/fourslash/goToType/typedefinition01.baseline.jsonc | New baseline for basic type definition via imported class. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition_typedef.baseline.jsonc | Baseline for JSDoc typedef resolution. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition_typeReference.baseline.jsonc | Baseline for generic type reference. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition_returnType.baseline.jsonc | Baselines for multiple return type targets. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition_promiseType.baseline.jsonc | Baselines for async function promise and variable. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition_arrayType.baseline.jsonc | Baselines for array and custom array types. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition_Pick.baseline.jsonc | Baselines for mapped Pick type usage. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinitionUnionType.baseline.jsonc | Baseline for union type navigation. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinitionPrimitives.baseline.jsonc | Baselines for primitive and union primitive members. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinitionModule.baseline.jsonc | Baselines for module and typeof module variable. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinitionModifiers.baseline.jsonc | Baselines for class member modifiers and keywords. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinitionImportMeta.baseline.jsonc | Baseline for ImportMeta interface resolution. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinitionEnumMembers.baseline.jsonc | Baseline for enum member type. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinitionAliases.baseline.jsonc | Baselines for exported/imported alias chains. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition5.baseline.jsonc | Baseline for shadowed identifier (var/type). |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition4.baseline.jsonc | Baseline for conflicting type/value export name. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition3.baseline.jsonc | Baseline for simple type alias usage. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition2.baseline.jsonc | Baseline for property referencing aliased interface. |
| testdata/baselines/reference/fourslash/goToType/goToTypeDefinition.baseline.jsonc | Baseline for basic class instance. |
| testdata/baselines/reference/fourslash/goToDefinition/goToTypeDefinition4.baseline.jsonc | Added definition baseline for overlapping type/value symbol test. |
| internal/fourslash/tests/gen/typedefinition01_test.go | New generated test for basic type definition. |
| internal/fourslash/tests/gen/jsDocServices_test.go | Added (skipped) JSDoc services test including type definition verification. |
| internal/fourslash/tests/gen/goToTypeDefinition_typedef_test.go | Generated test for JSDoc typedef. |
| internal/fourslash/tests/gen/goToTypeDefinition_typeReference_test.go | Generated test for generic type reference. |
| internal/fourslash/tests/gen/goToTypeDefinition_test.go | Generated test for class instance type definition. |
| internal/fourslash/tests/gen/goToTypeDefinition_returnType_test.go | Generated test covering various return types. |
| internal/fourslash/tests/gen/goToTypeDefinition_promiseType_test.go | Generated promise resolution test. |
| internal/fourslash/tests/gen/goToTypeDefinition_arrayType_test.go | Generated array/custom array tests. |
| internal/fourslash/tests/gen/goToTypeDefinition_Pick_test.go | Generated Pick mapped type test. |
| internal/fourslash/tests/gen/goToTypeDefinitionUnionType_test.go | Generated union type test. |
| internal/fourslash/tests/gen/goToTypeDefinitionPrimitives_test.go | Generated primitives navigation test. |
| internal/fourslash/tests/gen/goToTypeDefinitionModule_test.go | Generated module/typeof test. |
| internal/fourslash/tests/gen/goToTypeDefinitionModifiers_test.go | Generated modifiers test. |
| internal/fourslash/tests/gen/goToTypeDefinitionImportMeta_test.go | Generated ImportMeta test. |
| internal/fourslash/tests/gen/goToTypeDefinitionEnumMembers_test.go | Generated enum member test. |
| internal/fourslash/tests/gen/goToTypeDefinitionAliases_test.go | Generated alias chain test. |
| internal/fourslash/tests/gen/goToTypeDefinition5_test.go | Generated shadowed identifier test. |
| internal/fourslash/tests/gen/goToTypeDefinition4_test.go | Generated conflicting symbol test including go-to-def. |
| internal/fourslash/tests/gen/goToTypeDefinition3_test.go | Generated simple alias test. |
| internal/fourslash/tests/gen/goToTypeDefinition2_test.go | Generated property alias test. |
| internal/fourslash/fourslash.go | Added VerifyBaselineGoToTypeDefinition implementation. |
| internal/fourslash/_scripts/failingTests.txt | Registered skipped JSDoc test as failing. |
| internal/fourslash/_scripts/convertFourslash.mts | Extended script to parse and generate go-to-type baseline commands. |
jakebailey
approved these changes
Oct 15, 2025
GGomez99
pushed a commit
to GGomez99/typescript-go
that referenced
this pull request
Oct 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.