mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
fix types in array helper
This commit is contained in:
@@ -12,9 +12,7 @@ mongoose.connect(MONGO_URI, {
|
||||
serverSelectionTimeoutMS: 3000,
|
||||
})
|
||||
|
||||
export async function getBookedDays(
|
||||
uuidsToIngore?: string[]
|
||||
): Promise<string[]> {
|
||||
export async function getBookedDays(uuidsToIngore?: string[]) {
|
||||
const [bookedInDatabase, bookedInCalendar] = await Promise.all([
|
||||
BookingModel.findBookedDays(uuidsToIngore),
|
||||
calendarGetBookedDays(),
|
||||
|
||||
@@ -17,6 +17,6 @@ export function getNextBigger<T>(array: T[], pivot: T): T {
|
||||
return array.sort().find((day) => day > pivot)
|
||||
}
|
||||
|
||||
export function uniqueFilter(value, index, self) {
|
||||
export function uniqueFilter<T>(value: T, index: number, self: T[]) {
|
||||
return self.indexOf(value) === index
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user