Skip to content

Conversation

@gabritto
Copy link
Member

No description provided.

@gabritto gabritto marked this pull request as ready for review October 15, 2025 18:00
Copilot AI review requested due to automatic review settings October 15, 2025 18:00
Copy link
Contributor

Copilot AI left a 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.

@gabritto gabritto added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit 6183abf Oct 15, 2025
22 checks passed
@gabritto gabritto deleted the gabritto/def3 branch October 15, 2025 18:35
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants