refactor(language-service): create getReferencesAtPosition stubs (#39829)
Create stubs for getTypeDefinitionAtPosition for both VE and Ivy Language Service implementations. This will prevent failed requests when it is implemented on the vscode plugin side. PR Close #39829
This commit is contained in:
parent
3a6e7b5d2a
commit
8758006acc
|
@ -56,11 +56,17 @@ export function create(info: ts.server.PluginCreateInfo): ts.LanguageService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getReferencesAtPosition(fileName: string, position: number) {
|
||||||
|
// TODO(atscott): implement references
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...tsLS,
|
...tsLS,
|
||||||
getSemanticDiagnostics,
|
getSemanticDiagnostics,
|
||||||
getTypeDefinitionAtPosition,
|
getTypeDefinitionAtPosition,
|
||||||
getQuickInfoAtPosition,
|
getQuickInfoAtPosition,
|
||||||
getDefinitionAndBoundSpan,
|
getDefinitionAndBoundSpan,
|
||||||
|
getReferencesAtPosition,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,11 @@ export function create(info: tss.server.PluginCreateInfo): tss.LanguageService {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getReferencesAtPosition(fileName: string, position: number) {
|
||||||
|
// Not implemented in VE Language Service
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// First clone the original TS language service
|
// First clone the original TS language service
|
||||||
...tsLS,
|
...tsLS,
|
||||||
|
@ -125,5 +130,6 @@ export function create(info: tss.server.PluginCreateInfo): tss.LanguageService {
|
||||||
getDefinitionAtPosition,
|
getDefinitionAtPosition,
|
||||||
getDefinitionAndBoundSpan,
|
getDefinitionAndBoundSpan,
|
||||||
getTypeDefinitionAtPosition,
|
getTypeDefinitionAtPosition,
|
||||||
|
getReferencesAtPosition,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue