Remove any casts
This commit is contained in:
parent
5e697b348c
commit
6dd0a9a64d
|
@ -39,10 +39,10 @@ export default class TypeScriptDefinitionProvider extends DefinitionProviderBase
|
||||||
return response.body.definitions
|
return response.body.definitions
|
||||||
.map((location): vscode.DefinitionLink => {
|
.map((location): vscode.DefinitionLink => {
|
||||||
const target = typeConverters.Location.fromTextSpan(this.client.toResource(location.file), location);
|
const target = typeConverters.Location.fromTextSpan(this.client.toResource(location.file), location);
|
||||||
if ((location as any).contextStart) {
|
if (location.contextStart && location.contextEnd) {
|
||||||
return {
|
return {
|
||||||
originSelectionRange: span,
|
originSelectionRange: span,
|
||||||
targetRange: typeConverters.Range.fromLocations((location as any).contextStart, (location as any).contextEnd),
|
targetRange: typeConverters.Range.fromLocations(location.contextStart, location.contextEnd),
|
||||||
targetUri: target.uri,
|
targetUri: target.uri,
|
||||||
targetSelectionRange: target.range,
|
targetSelectionRange: target.range,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue