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:

committed by
Alex Rickabaugh

parent
7c64b1889f
commit
c365eded5b
@ -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(); });
|
||||
|
||||
|
Reference in New Issue
Block a user