refactor(language-service): Consistent naming between ts and ng LanguageService (#34888)
This commit makes the Angular Language Service interface a strict subset of TypeScript's Language Service by renaming all methods to be consistent with TypeScript's. The custom Angular `LanguageService` interface was needed before the inception of TypeScript tsserver plugin, but is now obsolete since Angular LS is a proper tsserver plugin. This allows us to easily adapt to upstream TS changes in the future, and also allows us to reuse all data types defined in TypeScript. PR Close #34888
This commit is contained in:

committed by
Matias Niemelä

parent
84d24c08e1
commit
f723a27a71
@ -24,16 +24,17 @@ describe('service without angular', () => {
|
||||
beforeEach(() => { mockHost.reset(); });
|
||||
|
||||
it('should not crash a get diagnostics',
|
||||
() => { expect(() => ngService.getDiagnostics(fileName)).not.toThrow(); });
|
||||
() => { expect(() => ngService.getSemanticDiagnostics(fileName)).not.toThrow(); });
|
||||
|
||||
it('should not crash a completion',
|
||||
() => { expect(() => ngService.getCompletionsAt(fileName, position)).not.toThrow(); });
|
||||
() => { expect(() => ngService.getCompletionsAtPosition(fileName, position)).not.toThrow(); });
|
||||
|
||||
it('should not crash a get definition',
|
||||
() => { expect(() => ngService.getDefinitionAt(fileName, position)).not.toThrow(); });
|
||||
it('should not crash a get definition', () => {
|
||||
expect(() => ngService.getDefinitionAndBoundSpan(fileName, position)).not.toThrow();
|
||||
});
|
||||
|
||||
it('should not crash a hover',
|
||||
() => { expect(() => ngService.getHoverAt(fileName, position)).not.toThrow(); });
|
||||
() => { expect(() => ngService.getQuickInfoAtPosition(fileName, position)).not.toThrow(); });
|
||||
|
||||
it('should not crash with an incomplete class', () => {
|
||||
mockHost.addCode('\nexport class');
|
||||
|
Reference in New Issue
Block a user