@@ -69,13 +69,13 @@ export default class DefinitionAdapter {
69
69
* @returns An {Array} of {Location}s or {null} if the locationResult was null.
70
70
*/
71
71
public static normalizeLocations (
72
- locationResult : Location | ( Location | LocationLink ) [ ]
73
- ) : ( Location | LocationLink ) [ ] | null {
72
+ locationResult : Location | Location [ ] | LocationLink [ ] | null
73
+ ) : Location [ ] | LocationLink [ ] | null {
74
74
if ( locationResult == null ) {
75
75
return null
76
76
}
77
- return ( Array . isArray ( locationResult ) ? locationResult : [ locationResult ] ) . filter (
78
- ( d ) => ( "range" in d ? d . range : d . targetRange ) . start != null
77
+ return ( Array . isArray ( locationResult ) ? locationResult as any [ ] : [ locationResult ] ) . filter (
78
+ ( d : Location | LocationLink ) => ( "range" in d ? d . range : d . targetRange ) . start != null
79
79
)
80
80
}
81
81
@@ -87,10 +87,10 @@ export default class DefinitionAdapter {
87
87
* @returns An {Array} of {Definition}s that represented the converted {Location}s.
88
88
*/
89
89
public static convertLocationsToDefinitions (
90
- locations : ( Location | LocationLink ) [ ] ,
90
+ locations : Location [ ] | LocationLink [ ] ,
91
91
languageName : string
92
92
) : atomIde . Definition [ ] {
93
- return locations . map ( ( d ) => ( {
93
+ return ( locations as any [ ] ) . map ( ( d : Location | LocationLink ) => ( {
94
94
path : Convert . uriToPath ( "uri" in d ? d . uri : d . targetUri ) ,
95
95
position : Convert . positionToPoint ( ( "range" in d ? d . range : d . targetRange ) . start ) ,
96
96
range : Range . fromObject ( Convert . lsRangeToAtomRange ( "range" in d ? d . range : d . targetRange ) ) ,
0 commit comments