mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(language-service): Clean up getTcb interface (#40954)
`GetTcbResponse` should not be a union type with `undefined`. PR Close #40954
This commit is contained in:
parent
06d3267824
commit
3d8ac06e4b
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ export type GetTcbResponse = {
|
|||
* code, `selections` is empty.
|
||||
*/
|
||||
selections: ts.TextSpan[],
|
||||
}|undefined;
|
||||
};
|
||||
|
||||
export type GetComponentLocationsForTemplateResponse = ts.DocumentSpan[];
|
||||
|
||||
|
|
@ -40,6 +40,6 @@ export type GetComponentLocationsForTemplateResponse = ts.DocumentSpan[];
|
|||
* whose API surface is a strict superset of TypeScript's language service.
|
||||
*/
|
||||
export interface NgLanguageService extends ts.LanguageService {
|
||||
getTcb(fileName: string, position: number): GetTcbResponse;
|
||||
getTcb(fileName: string, position: number): GetTcbResponse|undefined;
|
||||
getComponentLocationsForTemplate(fileName: string): GetComponentLocationsForTemplateResponse;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue