From 08a8d194016dfc140b9ec8a4b398f351d280e1e9 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 13 Sep 2023 17:21:36 +0300 Subject: [PATCH] * add GuestsObject interface to represent guests * add StaySearchFormFields type to represent the fields in the stay search form * add PropertyType interface to represent a property type * add ClassOfProperties interface to extend PropertyType --- src/app/(client-components)/type.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/app/(client-components)/type.ts diff --git a/src/app/(client-components)/type.ts b/src/app/(client-components)/type.ts new file mode 100644 index 0000000..54b2ed8 --- /dev/null +++ b/src/app/(client-components)/type.ts @@ -0,0 +1,17 @@ +export interface GuestsObject { + guestAdults?: number; + guestChildren?: number; + guestInfants?: number; +} + +export type StaySearchFormFields = "location" | "guests" | "dates"; + +export interface PropertyType { + name: string; + description: string; + checked: boolean; +} + +export interface ClassOfProperties extends PropertyType {} + +export type DateRage = [Date | null, Date | null];