-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Never return undefined from
getExportsOfModule
(#17019)
- Loading branch information
Andy
committed
Jul 11, 2017
1 parent
8b2fe13
commit 50abee3
Showing
2 changed files
with
19 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
16 changes: 16 additions & 0 deletions
16
tests/cases/fourslash/completionList_getExportsOfModule.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,16 @@ | ||
/// <reference path='fourslash.ts'/> | ||
|
||
// This used to cause a crash because we would ask for exports on `"x"`, | ||
// which would return undefined and cause a NPE. Now we return emptySymbol instead. | ||
// See GH#16610. | ||
|
||
////declare module "x" { | ||
//// declare var x: number; | ||
//// export = x; | ||
////} | ||
//// | ||
////let y: /**/ | ||
|
||
goTo.marker(); | ||
// This is just a dummy test to cause `getCompletionsAtPosition` to be called. | ||
verify.not.completionListContains("x"); |