format on save, resolve compile errors, functionality 1. stage

This commit is contained in:
2024-04-23 17:32:21 +02:00
parent 7f0f21b598
commit 9e03620be7
32 changed files with 1506 additions and 1389 deletions

View File

@@ -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;
}