format on save, resolve compile errors, functionality 1. stage
This commit is contained in:
@@ -37,6 +37,12 @@ export function createGenericObject<T>(): T {
|
||||
return storedState ? JSON.parse(storedState) : initialState;
|
||||
}
|
||||
|
||||
export function getListingType(listing:BusinessListing|CommercialPropertyListing){
|
||||
return listing.type<100?'business':'commercialProperty';
|
||||
export function getListingType(listing:BusinessListing|CommercialPropertyListing):'business'|'commercialProperty'{
|
||||
return listing?.type<100?'business':'commercialProperty';
|
||||
}
|
||||
export function isBusinessListing(listing: BusinessListing | CommercialPropertyListing): listing is BusinessListing {
|
||||
return listing?.type < 100;
|
||||
}
|
||||
export function isCommercialPropertyListing(listing: BusinessListing | CommercialPropertyListing): listing is CommercialPropertyListing {
|
||||
return listing?.type >= 100;
|
||||
}
|
||||
Reference in New Issue
Block a user