MCPcopy Create free account
hub / github.com/microsoft/typescript-go / GetProjectsForFile

Method GetProjectsForFile

internal/project/session.go:1006–1016  ·  view source on GitHub ↗
(ctx context.Context, uri lsproto.DocumentUri)

Source from the content-addressed store, hash-verified

1004}
1005
1006func (s *Session) GetProjectsForFile(ctx context.Context, uri lsproto.DocumentUri) ([]ls.Project, error) {
1007 snapshot := s.getSnapshot(
1008 ctx,
1009 ResourceRequest{ConfiguredProjectDocuments: []lsproto.DocumentUri{uri}},
1010 false, /*callerRef*/
1011 )
1012
1013 // !!! TODO: sheetal: Get other projects that contain the file with symlink
1014 allProjects := snapshot.GetProjectsContainingFile(uri)
1015 return allProjects, nil
1016}
1017
1018func (s *Session) GetLanguageServicesForDocuments(ctx context.Context, uris []lsproto.DocumentUri) []*ls.LanguageService {
1019 snapshot := s.getSnapshot(

Callers

nothing calls this directly

Calls 2

getSnapshotMethod · 0.95

Tested by

no test coverage detected