Skip to content

Commit

Permalink
Revert go-to-implementation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Mar 14, 2022
1 parent bea3de0 commit 4e64659
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/services/findAllReferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2313,10 +2313,10 @@ namespace ts.FindAllReferences {
}

function isImplementation(node: Node): boolean {
return !(node.flags & NodeFlags.Ambient) && (
return !!(node.flags & NodeFlags.Ambient) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) :
(isVariableLike(node) ? hasInitializer(node) :
isFunctionLikeDeclaration(node) ? !!node.body :
isClassLike(node) || isModuleOrEnumDeclaration(node)));
isClassLike(node) || isModuleOrEnumDeclaration(node));
}

export function getReferenceEntriesForShorthandPropertyAssignment(node: Node, checker: TypeChecker, addReference: (node: Node) => void): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
////f[/*0*/"x"] = 0;
////f[[|/*1*/"x"|]] = 1;

verify.goToDefinition("1", ["0", "1"]);
verify.goToDefinition("1", "0");
2 changes: 1 addition & 1 deletion tests/cases/fourslash/goToImplementationLocal_06.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
//// declare var [|someVar|]: string;
//// someVa/*reference*/r

verify.implementationListIsEmpty();
verify.allRangesAppearInImplementationList("reference");
2 changes: 1 addition & 1 deletion tests/cases/fourslash/goToImplementationLocal_07.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
//// declare function [|someFunction|](): () => void;
//// someFun/*reference*/ction();

verify.implementationListIsEmpty();
verify.allRangesAppearInImplementationList("reference");
3 changes: 1 addition & 2 deletions tests/cases/fourslash/goToImplementationLocal_08.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
//// declare function [|someFunction|](): () => void;
//// someFun/*reference*/ction();

goTo.marker("reference");
verify.implementationListIsEmpty();
verify.allRangesAppearInImplementationList("reference");

0 comments on commit 4e64659

Please sign in to comment.