Adds support for `getDefinitionAt` when called on a templateUrl property assignment. The currrent architecture for getting definitions is designed to be called on templates, so we have to introduce a new `getTsDefinitionAndBoundSpan` method to get Angular-specific definitions in TypeScript files and pass a `readTemplate` closure that will read the contents of a template using `TypeScriptServiceHost#getTemplates`. We can probably go in and make this nicer in a future PR, though I'm not sure what the best architecture should be yet. Part of angular/vscode-ng-language-service#111 PR Close #32238
33 lines
532 B
JSON
33 lines
532 B
JSON
{
|
|
"seq": 0,
|
|
"type": "response",
|
|
"command": "definitionAndBoundSpan",
|
|
"request_seq": 2,
|
|
"success": true,
|
|
"body": {
|
|
"definitions": [
|
|
{
|
|
"file": "${PWD}/project/app/widget.component.html",
|
|
"start": {
|
|
"line": 1,
|
|
"offset": 1
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"offset": 1
|
|
}
|
|
}
|
|
],
|
|
"textSpan": {
|
|
"start": {
|
|
"line": 5,
|
|
"offset": 17
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"offset": 40
|
|
}
|
|
}
|
|
}
|
|
}
|