Make signatures consistent

This commit is contained in:
Justin Edmund 2023-07-06 22:55:10 -07:00
parent 43ccb464b1
commit 7224ae8585
4 changed files with 6 additions and 6 deletions

View file

@ -40,7 +40,7 @@ export function toObject(data: any): Party {
},
raid: Raid.toObject(data.raid),
guidebooks: data.guidebooks,
} as Party
}
}
// Transforms Party object into API parameters

View file

@ -1,7 +1,7 @@
import * as Raid from './RaidTransformer'
// Transforms API response to RaidGroup object
export function toObject(data: any) {
export function toObject(data: any): RaidGroup {
return {
id: data.id,
name: {
@ -15,5 +15,5 @@ export function toObject(data: any) {
extra: data.extra,
guidebooks: data.guidebooks,
hl: data.hl,
} as RaidGroup
}
}

View file

@ -2,7 +2,7 @@ import * as Element from './ElementTransformer'
import * as RaidGroup from './RaidGroupTransformer'
// Transforms API response to Raid object
export function toObject(data: any) {
export function toObject(data: any): Raid {
return {
id: data.id,
group: RaidGroup.toObject(data.group),
@ -13,5 +13,5 @@ export function toObject(data: any) {
element: Element.toObject(data.element),
level: data.level,
slug: data.slug,
} as Raid
}
}

View file

@ -10,7 +10,7 @@ export function toObject(data: any): User {
gender: data.gender,
language: data.language,
theme: data.theme,
} as User
}
}
// Transforms User object into API parameters