fix(web): resolve all 22 TypeScript typecheck errors in apps/web (TEC-3208)
- Fix TS4111: use bracket notation for index signature access in metadata.spec.ts, neighborhood-poi-map.tsx, and neighborhood-poi-map.spec.tsx - Fix TS2740: add missing property fields (usableAreaM2, floor, totalFloors, nearbyPOIs, etc.) to test mock objects in 5 spec files - Fix TS2339: add missing estimate() and create() methods to transferApi - Fix TS4114: add override modifier to render() in page.tsx error boundary - Fix TS2532: add optional chaining for possibly undefined features in neighborhood-poi-map.tsx Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -262,6 +262,20 @@ function makeListing(
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
media: [],
|
||||
usableAreaM2: null,
|
||||
floor: null,
|
||||
totalFloors: null,
|
||||
nearbyPOIs: null,
|
||||
metroDistanceM: null,
|
||||
furnishing: null,
|
||||
propertyCondition: null,
|
||||
balconyDirection: null,
|
||||
maintenanceFeeVND: null,
|
||||
parkingSlots: null,
|
||||
viewType: [],
|
||||
petFriendly: null,
|
||||
suitableFor: [],
|
||||
whyThisLocation: null,
|
||||
},
|
||||
seller: {
|
||||
id: 'seller-1',
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
type LucideIcon,
|
||||
} from 'lucide-react';
|
||||
import { apiClient } from './api-client';
|
||||
import type { AiEstimateResult } from './transfer-wizard-store';
|
||||
|
||||
// ─── Types ──────────────────────────────────────────────
|
||||
|
||||
@@ -185,4 +186,16 @@ export const transferApi = {
|
||||
|
||||
getStats: () =>
|
||||
apiClient.get<TransferStats>('/transfer/stats'),
|
||||
|
||||
estimate: (payload: { category: TransferCategory; condition: TransferCondition; originalPriceVND: number; purchaseYear: number }[]) =>
|
||||
apiClient.post<AiEstimateResult>(
|
||||
'/transfer/estimate',
|
||||
payload,
|
||||
),
|
||||
|
||||
create: (payload: Record<string, unknown>) =>
|
||||
apiClient.post<{ listingId: string; status: string }>(
|
||||
'/transfer/listings',
|
||||
payload,
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user