refactor(language-service): Remove NgLSHost -> NgLS dependency (#31122)
``` NgLSHost: AngularLanguageServiceHost NgLS: AngularLanguageService ``` NgLSHost should not depend on NgLS, because it introduces circular dependency. Instead, the `getTemplateAst` and `getTemplatAstAtPosition` methods should be moved to NgLSHost and exposed as public methods. This removes the circular dependency, and also removes the need for the awkward 'setSite' method in NgLSHost. PR Close #31122
This commit is contained in:

committed by
Kara Erickson

parent
c34abf2cbc
commit
4ec50811d4
@ -81,7 +81,6 @@ export function create(info: tss.server.PluginCreateInfo): ts.LanguageService {
|
||||
|
||||
const serviceHost = new TypeScriptServiceHost(info.languageServiceHost, oldLS);
|
||||
const ls = createLanguageService(serviceHost);
|
||||
serviceHost.setSite(ls);
|
||||
projectHostMap.set(info.project, serviceHost);
|
||||
|
||||
proxy.getCompletionsAtPosition = function(
|
||||
|
Reference in New Issue
Block a user