-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in importTracker:
getExportNode
must verify that we are on …
…the LHS of a VariableDeclaration
- Loading branch information
Andy Hanson
committed
Jul 14, 2017
1 parent
680bfbb
commit 30f83c5
Showing
2 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
17 changes: 17 additions & 0 deletions
17
tests/cases/fourslash/findAllRefsExportConstEqualToClass.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
// @Filename: /a.ts | ||
////class [|{| "isWriteAccess": true, "isDefinition": true |}C|] {} | ||
////export const [|{| "isWriteAccess": true, "isDefinition": true |}D|] = [|C|]; | ||
|
||
// @Filename: /b.ts | ||
////import { [|{| "isWriteAccess": true, "isDefinition": true |}D|] } from "./a"; | ||
|
||
const [C0, D0, C1, D1] = test.ranges(); | ||
|
||
verify.singleReferenceGroup("class C", [C0, C1]); | ||
|
||
const d0Group = { definition: "const D: typeof C", ranges: [D0] }; | ||
const d1Group = { definition: "import D", ranges: [D1] }; | ||
verify.referenceGroups(D0, [d0Group, d1Group]); | ||
verify.referenceGroups(D1, [d1Group, d0Group]); |