mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Do not offer completions for default module member symbol (#55231)
This commit is contained in:
parent
b87e301822
commit
defe33afa1
@ -45463,7 +45463,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
if (meaning) {
|
||||
source.forEach(symbol => {
|
||||
// Similar condition as in `resolveNameHelper`
|
||||
if (!getDeclarationOfKind(symbol, SyntaxKind.ExportSpecifier) && !getDeclarationOfKind(symbol, SyntaxKind.NamespaceExport)) {
|
||||
if (!getDeclarationOfKind(symbol, SyntaxKind.ExportSpecifier) && !getDeclarationOfKind(symbol, SyntaxKind.NamespaceExport) && symbol.escapedName !== InternalSymbolName.Default) {
|
||||
copySymbol(symbol, meaning);
|
||||
}
|
||||
});
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// https://github.com/microsoft/TypeScript/issues/3229
|
||||
|
||||
// @filename: index.ts
|
||||
|
||||
//// export default function () {}
|
||||
//// def/*1*/
|
||||
|
||||
verify.completions(
|
||||
{
|
||||
marker: "1",
|
||||
includes: [{ name: "default", kind: "keyword", sortText: completion.SortText.GlobalsOrKeywords }],
|
||||
},
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user