Skip to content

Commit e45d0f2

Browse files
committed
chore: npm run format
1 parent df5c53c commit e45d0f2

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

lib/adapters/definition-adapter.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,15 @@ export default class DefinitionAdapter {
6868
* @param locationResult Either a single {Location} object or an {Array} of {Locations}.
6969
* @returns An {Array} of {Location}s or {null} if the locationResult was null.
7070
*/
71-
public static normalizeLocations(locationResult: Location | (Location | LocationLink)[]): (Location | LocationLink)[] | null {
71+
public static normalizeLocations(
72+
locationResult: Location | (Location | LocationLink)[]
73+
): (Location | LocationLink)[] | null {
7274
if (locationResult == null) {
7375
return null
7476
}
75-
return (Array.isArray(locationResult) ? locationResult : [locationResult]).filter((d) => ('range' in d?d.range:d.targetRange).start != null)
77+
return (Array.isArray(locationResult) ? locationResult : [locationResult]).filter(
78+
(d) => ("range" in d ? d.range : d.targetRange).start != null
79+
)
7680
}
7781

7882
/**
@@ -82,11 +86,14 @@ export default class DefinitionAdapter {
8286
* @param languageName The name of the language these objects are written in.
8387
* @returns An {Array} of {Definition}s that represented the converted {Location}s.
8488
*/
85-
public static convertLocationsToDefinitions(locations: (Location | LocationLink)[], languageName: string): atomIde.Definition[] {
89+
public static convertLocationsToDefinitions(
90+
locations: (Location | LocationLink)[],
91+
languageName: string
92+
): atomIde.Definition[] {
8693
return locations.map((d) => ({
87-
path: Convert.uriToPath('uri' in d?d.uri:d.targetUri),
88-
position: Convert.positionToPoint(('range' in d?d.range:d.targetRange).start),
89-
range: Range.fromObject(Convert.lsRangeToAtomRange('range' in d?d.range:d.targetRange)),
94+
path: Convert.uriToPath("uri" in d ? d.uri : d.targetUri),
95+
position: Convert.positionToPoint(("range" in d ? d.range : d.targetRange).start),
96+
range: Range.fromObject(Convert.lsRangeToAtomRange("range" in d ? d.range : d.targetRange)),
9097
language: languageName,
9198
}))
9299
}

0 commit comments

Comments
 (0)