mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-13 22:53:33 -05:00
Merge pull request #7326 from RyanCavanaugh/fix4577
Show aliases (e.g. imports) in JSX tag completion positions
This commit is contained in:
@@ -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;
|
||||
|
||||
14
tests/cases/fourslash/tsxCompletion11.ts
Normal file
14
tests/cases/fourslash/tsxCompletion11.ts
Normal 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');
|
||||
Reference in New Issue
Block a user