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:
Keen Yee Liau
2019-06-18 16:55:53 -07:00
committed by Kara Erickson
parent c34abf2cbc
commit 4ec50811d4
10 changed files with 140 additions and 139 deletions

View File

@ -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', '&', '>', '<', 'ι'); });