fix(language-service): Remove getTemplateReferences() from LanguageService API (#33807)

The method `getTemplateReferences()` appears in both the LanguageService
interface and LanguageServiceHost interface. It should belong in the
latter and not the former, since the former deals with the semantics of
the language and not the mechanics.

PR Close #33807
This commit is contained in:
Keen Yee Liau
2019-11-13 13:13:59 -08:00
committed by Alex Rickabaugh
parent 7c64b1889f
commit c365eded5b
6 changed files with 11 additions and 24 deletions

View File

@ -14,7 +14,7 @@ import {TypeScriptServiceHost} from '../src/typescript_host';
import {MockTypescriptHost} from './test_utils';
describe('service without angular', () => {
const mockHost = new MockTypescriptHost(['/app/main.ts', '/app/parsing-cases.ts']);
const mockHost = new MockTypescriptHost(['/app/main.ts']);
const service = ts.createLanguageService(mockHost);
const ngHost = new TypeScriptServiceHost(mockHost, service);
const ngService = createLanguageService(ngHost);
@ -23,8 +23,6 @@ describe('service without angular', () => {
beforeEach(() => { mockHost.reset(); });
it('should not crash a get template references',
() => { expect(() => ngService.getTemplateReferences()).not.toThrow(); });
it('should not crash a get diagnostics',
() => { expect(() => ngService.getDiagnostics(fileName)).not.toThrow(); });