mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 23:06:49 +01:00
Remove any casts
This commit is contained in:
@@ -39,10 +39,10 @@ export default class TypeScriptDefinitionProvider extends DefinitionProviderBase
|
||||
return response.body.definitions
|
||||
.map((location): vscode.DefinitionLink => {
|
||||
const target = typeConverters.Location.fromTextSpan(this.client.toResource(location.file), location);
|
||||
if ((location as any).contextStart) {
|
||||
if (location.contextStart && location.contextEnd) {
|
||||
return {
|
||||
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,
|
||||
targetSelectionRange: target.range,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user