feat(language-service): Add getTypeDefinitionAtPosition (go to type definition) (#39145)
This commit adds the implementation for providing "go to type definition" functionality in the Ivy Language Service. PR Close #39145
This commit is contained in:
@ -60,6 +60,14 @@ export class LanguageService {
|
||||
return new DefinitionBuilder(this.tsLS, compiler).getDefinitionAndBoundSpan(fileName, position);
|
||||
}
|
||||
|
||||
getTypeDefinitionAtPosition(fileName: string, position: number):
|
||||
readonly ts.DefinitionInfo[]|undefined {
|
||||
const program = this.strategy.getProgram();
|
||||
const compiler = this.createCompiler(program, fileName);
|
||||
return new DefinitionBuilder(this.tsLS, compiler)
|
||||
.getTypeDefinitionsAtPosition(fileName, position);
|
||||
}
|
||||
|
||||
getQuickInfoAtPosition(fileName: string, position: number): ts.QuickInfo|undefined {
|
||||
const program = this.strategy.getProgram();
|
||||
const compiler = this.createCompiler(program, fileName);
|
||||
|
Reference in New Issue
Block a user