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
|
@ -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 New Issue