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
@ -22,7 +22,6 @@ describe('completions', () => {
|
||||
let service = ts.createLanguageService(mockHost, documentRegistry);
|
||||
let ngHost = new TypeScriptServiceHost(mockHost, service);
|
||||
let ngService = createLanguageService(ngHost);
|
||||
ngHost.setSite(ngService);
|
||||
|
||||
it('should be able to get entity completions',
|
||||
() => { contains('/app/test.ng', 'entity-amp', '&', '>', '<', 'ι'); });
|
||||
|
Reference in New Issue
Block a user