@@ -64,7 +64,6 @@ import {
6464 Expression ,
6565 ExpressionWithTypeArguments ,
6666 factory ,
67- fileContainsPackageImport ,
6867 filter ,
6968 find ,
7069 findAncestor ,
@@ -175,7 +174,7 @@ import {
175174 isIdentifierPart ,
176175 isIdentifierStart ,
177176 isIdentifierText ,
178- isImportableFile ,
177+ isImportable ,
179178 isImportAttributes ,
180179 isImportDeclaration ,
181180 isImportEqualsDeclaration ,
@@ -274,7 +273,6 @@ import {
274273 JSDocTypedefTag ,
275274 JSDocTypeExpression ,
276275 JSDocTypeTag ,
277- JsTyping ,
278276 JsxAttribute ,
279277 JsxAttributes ,
280278 JsxClosingElement ,
@@ -344,7 +342,6 @@ import {
344342 SemanticMeaning ,
345343 setEmitFlags ,
346344 setSnippetElement ,
347- shouldUseUriStyleNodeCoreModules ,
348345 SignatureHelp ,
349346 SignatureKind ,
350347 singleElementArray ,
@@ -4221,19 +4218,11 @@ function getCompletionData(
42214218 ) ;
42224219
42234220 function isImportableExportInfo ( info : SymbolExportInfo ) {
4224- const moduleFile = tryCast ( info . moduleSymbol . valueDeclaration , isSourceFile ) ;
4225- if ( ! moduleFile ) {
4226- const moduleName = stripQuotes ( info . moduleSymbol . name ) ;
4227- if ( JsTyping . nodeCoreModules . has ( moduleName ) && startsWith ( moduleName , "node:" ) !== shouldUseUriStyleNodeCoreModules ( sourceFile , program ) ) {
4228- return false ;
4229- }
4230- return ( packageJsonFilter ?. allowsImportingAmbientModule ( info . moduleSymbol , getModuleSpecifierResolutionHost ( info . isFromPackageJson ) ) ?? true )
4231- || fileContainsPackageImport ( sourceFile , moduleName ) ;
4232- }
4233- return isImportableFile (
4221+ return isImportable (
42344222 info . isFromPackageJson ? packageJsonAutoImportProvider ! : program ,
42354223 sourceFile ,
4236- moduleFile ,
4224+ tryCast ( info . moduleSymbol . valueDeclaration , isSourceFile ) ,
4225+ info . moduleSymbol ,
42374226 preferences ,
42384227 packageJsonFilter ,
42394228 getModuleSpecifierResolutionHost ( info . isFromPackageJson ) ,
@@ -4371,7 +4360,7 @@ function getCompletionData(
43714360 // dprint-ignore
43724361 switch ( tokenKind ) {
43734362 case SyntaxKind . CommaToken :
4374- switch ( containingNodeKind ) {
4363+ switch ( containingNodeKind ) {
43754364 case SyntaxKind . CallExpression : // func( a, |
43764365 case SyntaxKind . NewExpression : { // new C(a, |
43774366 const expression = ( contextToken . parent as CallExpression | NewExpression ) . expression ;
@@ -4454,7 +4443,7 @@ function getCompletionData(
44544443 }
44554444
44564445 case SyntaxKind . TemplateHead :
4457- return {
4446+ return {
44584447 defaultCommitCharacters : allCommitCharacters ,
44594448 isNewIdentifierLocation : containingNodeKind === SyntaxKind . TemplateExpression // `aa ${|
44604449 } ;
0 commit comments