Implement getDefinitionAndBoundSpan
This commit is contained in:
parent
8a51e87f38
commit
0962c5e41a
|
@ -461,7 +461,18 @@ const boot: tslib.server.PluginModuleFactory = ({ typescript: ts }) => {
|
|||
}
|
||||
|
||||
getDefinitionAndBoundSpan(fileName: string, position: number): ts.DefinitionInfoAndBoundSpan | undefined {
|
||||
throw new Error('Method not implemented.');
|
||||
return withPosition(
|
||||
fileName, position,
|
||||
() => this.inner.getDefinitionAndBoundSpan(fileName, position),
|
||||
() => undefined,
|
||||
(fixup) => {
|
||||
const d = this.inner.getDefinitionAndBoundSpan(fileName, fixup.targetStart);
|
||||
if (d !== void 0) {
|
||||
d.definitions?.forEach(fixupDocumentSpan);
|
||||
fixup.span(d.textSpan);
|
||||
}
|
||||
return d;
|
||||
});
|
||||
}
|
||||
|
||||
getTypeDefinitionAtPosition(fileName: string, position: number): readonly ts.DefinitionInfo[] | undefined {
|
||||
|
|
Loading…
Reference in New Issue