From cebbebf5dfab23123a95533b9165152a6601f91e Mon Sep 17 00:00:00 2001 From: Thomas Ruoff Date: Tue, 1 Apr 2025 22:10:28 +0200 Subject: [PATCH] fix types in array helper --- db/index.ts | 4 +--- helpers/array.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/db/index.ts b/db/index.ts index c5caa03..b919883 100644 --- a/db/index.ts +++ b/db/index.ts @@ -12,9 +12,7 @@ mongoose.connect(MONGO_URI, { serverSelectionTimeoutMS: 3000, }) -export async function getBookedDays( - uuidsToIngore?: string[] -): Promise { +export async function getBookedDays(uuidsToIngore?: string[]) { const [bookedInDatabase, bookedInCalendar] = await Promise.all([ BookingModel.findBookedDays(uuidsToIngore), calendarGetBookedDays(), diff --git a/helpers/array.ts b/helpers/array.ts index eeca9b0..130a046 100644 --- a/helpers/array.ts +++ b/helpers/array.ts @@ -17,6 +17,6 @@ export function getNextBigger(array: T[], pivot: T): T { return array.sort().find((day) => day > pivot) } -export function uniqueFilter(value, index, self) { +export function uniqueFilter(value: T, index: number, self: T[]) { return self.indexOf(value) === index }