@@ -673,7 +673,7 @@ func (l *LanguageService) getReferencedSymbolsForNode(ctx context.Context, posit
673
673
}
674
674
675
675
moduleReferences := l .getReferencedSymbolsForModuleIfDeclaredBySourceFile (ctx , symbol , program , sourceFiles , checker , options , sourceFilesSet ) // !!! cancellationToken
676
- if moduleReferences != nil && symbol .Flags & ast .SymbolFlagsTransient = = 0 {
676
+ if moduleReferences != nil && symbol .Flags & ast .SymbolFlagsTransient ! = 0 {
677
677
return moduleReferences
678
678
}
679
679
@@ -976,44 +976,8 @@ func getMergedAliasedSymbolOfNamespaceExportDeclaration(node *ast.Node, symbol *
976
976
}
977
977
978
978
func getReferencedSymbolsForModule (program * compiler.Program , symbol * ast.Symbol , excludeImportTypeOfExportEquals bool , sourceFiles []* ast.SourceFile , sourceFilesSet * collections.Set [string ]) []* SymbolAndEntries {
979
- // Minimal implementation to prevent crashes when highlighting import paths.
980
- // This returns module declarations as references, which allows the early return
981
- // in getReferencedSymbolsForNode to work properly and avoid the panic in
982
- // skipPastExportOrImportSpecifierOrUnion.
983
-
984
- var references []* referenceEntry
985
-
986
- // Add the module declarations themselves as references
987
- if symbol .Declarations != nil {
988
- for _ , decl := range symbol .Declarations {
989
- switch decl .Kind {
990
- case ast .KindSourceFile :
991
- // Don't include the source file itself
992
- case ast .KindModuleDeclaration :
993
- sourceFile := ast .GetSourceFileOfNode (decl )
994
- if sourceFilesSet .Has (sourceFile .FileName ()) {
995
- references = append (references , & referenceEntry {
996
- kind : entryKindNode ,
997
- node : decl .AsModuleDeclaration ().Name (),
998
- fileName : sourceFile .FileName (),
999
- })
1000
- }
1001
- default :
1002
- // This may be merged with something
1003
- // TypeScript: Debug.assert(!!(symbol.flags & SymbolFlags.Transient))
1004
- }
1005
- }
1006
- }
1007
-
1008
- // Return as SymbolAndEntries even if there are no references
1009
- // This ensures the condition check in getReferencedSymbolsForNode works properly
1010
- return []* SymbolAndEntries {{
1011
- definition : & Definition {
1012
- Kind : definitionKindSymbol ,
1013
- symbol : symbol ,
1014
- },
1015
- references : references ,
1016
- }}
979
+ // !!! not implemented
980
+ return nil
1017
981
}
1018
982
1019
983
func getReferenceAtPosition (sourceFile * ast.SourceFile , position int , program * compiler.Program ) * refInfo {
0 commit comments