Merge pull request #15494 from Microsoft/fix_importClause_npe

importTracker: Fix error for undefined importClause
This commit is contained in:
Andy 2017-05-01 09:36:03 -07:00 committed by GitHub
commit 9d53e4c5e4
2 changed files with 15 additions and 0 deletions

View File

@ -212,6 +212,10 @@ namespace ts.FindAllReferences {
return;
}
if (!decl.importClause) {
return;
}
const { importClause } = decl;
const { namedBindings } = importClause;

View File

@ -0,0 +1,11 @@
/// <reference path="fourslash.ts" />
// https://github.com/Microsoft/TypeScript/issues/15452
// @Filename: /a.ts
////export const [|{| "isWriteAccess": true, "isDefinition": true |}x|] = 0;
// @Filename: /b.ts
////import "./a";
verify.singleReferenceGroup("const x: 0");