Merge pull request #7326 from RyanCavanaugh/fix4577

Show aliases (e.g. imports) in JSX tag completion positions
This commit is contained in:
Ryan Cavanaugh
2016-03-01 14:27:36 -08:00
2 changed files with 15 additions and 1 deletions

View File

@@ -3134,7 +3134,7 @@ namespace ts {
else if (isRightOfOpenTag) {
const tagSymbols = typeChecker.getJsxIntrinsicTagNames();
if (tryGetGlobalSymbols()) {
symbols = tagSymbols.concat(symbols.filter(s => !!(s.flags & SymbolFlags.Value)));
symbols = tagSymbols.concat(symbols.filter(s => !!(s.flags & (SymbolFlags.Value | SymbolFlags.Alias))));
}
else {
symbols = tagSymbols;

View File

@@ -0,0 +1,14 @@
/// <reference path='fourslash.ts' />
//@module: commonjs
//@jsx: preserve
//@Filename: exporter.tsx
//// export class Thing { }
//@Filename: file.tsx
//// import {Thing} from './exporter';
//// var x1 = <div></**/
goTo.marker();
verify.completionListContains('Thing');