forked from polka_billy/porridger
Code styling
Added brackets for const lambdas Converted const lambdas with multiple instructions to functions
This commit is contained in:
@ -17,21 +17,23 @@ type AnnouncementResponse = {
|
||||
booked_by: number
|
||||
}
|
||||
|
||||
const isAnnouncementResponse = (obj: unknown): obj is AnnouncementResponse => isObject(obj, {
|
||||
'id': 'number',
|
||||
'user_id': 'number',
|
||||
'name': 'string',
|
||||
'category': isCategory,
|
||||
'best_by': 'number',
|
||||
'address': 'string',
|
||||
'longtitude': 'number',
|
||||
'latitude': 'number',
|
||||
'description': 'string',
|
||||
'src': 'string?',
|
||||
'metro': 'string',
|
||||
'trashId': 'number?',
|
||||
'booked_by': 'number'
|
||||
})
|
||||
const isAnnouncementResponse = (obj: unknown): obj is AnnouncementResponse => (
|
||||
isObject(obj, {
|
||||
'id': 'number',
|
||||
'user_id': 'number',
|
||||
'name': 'string',
|
||||
'category': isCategory,
|
||||
'best_by': 'number',
|
||||
'address': 'string',
|
||||
'longtitude': 'number',
|
||||
'latitude': 'number',
|
||||
'description': 'string',
|
||||
'src': 'string?',
|
||||
'metro': 'string',
|
||||
'trashId': 'number?',
|
||||
'booked_by': 'number'
|
||||
})
|
||||
)
|
||||
|
||||
type Announcement = {
|
||||
id: number,
|
||||
|
Reference in New Issue
Block a user