Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/services/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ namespace ts.Completions {
// Don't add a completion for a re-export, only for the original.
// If `symbol.parent !== ...`, this comes from an `export * from "foo"` re-export. Those don't create new symbols.
// If `some(...)`, this comes from an `export { foo } from "foo"` re-export, which creates a new symbol (thus isn't caught by the first check).
if (symbol.parent !== typeChecker.resolveExternalModuleSymbol(moduleSymbol)
if (typeChecker.getMergedSymbol(symbol.parent) !== typeChecker.resolveExternalModuleSymbol(moduleSymbol)
|| some(symbol.declarations, d => isExportSpecifier(d) && !!d.parent.parent.moduleSpecifier)) {
continue;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/// <reference path="fourslash.ts" />

// @Filename: /b.d.ts
////declare namespace N {
//// export const foo: number;
////}
////declare module "n" {
//// export = N;
////}

// @Filename: /c.d.ts
////declare namespace N {}

// @Filename: /a.ts
////fo/**/

goTo.marker("");
verify.completionListContains({ name: "foo", source: "n" }, "const N.foo: number", "", "const", undefined, /*hasAction*/ true, {
includeExternalModuleExports: true,
sourceDisplay: "n",
});