diff --git a/ui/src/components/ImageCarousel.vue b/ui/src/components/ImageCarousel.vue index 77bb56d..727e611 100644 --- a/ui/src/components/ImageCarousel.vue +++ b/ui/src/components/ImageCarousel.vue @@ -31,7 +31,7 @@ export default class ImageCarousel extends Vue { private readonly contain!: boolean; @Prop({ required: true }) - private readonly urls!: Array; + private readonly urls!: string[]; } diff --git a/ui/src/components/calendar/Calendar.vue b/ui/src/components/calendar/Calendar.vue index eeb78b4..3613913 100644 --- a/ui/src/components/calendar/Calendar.vue +++ b/ui/src/components/calendar/Calendar.vue @@ -29,7 +29,7 @@ export default class Calendar extends Vue { private readonly title!: string; @Prop({ default: () => [] }) - private readonly events!: Array; + private readonly events!: EventData[]; } diff --git a/ui/src/components/calendar/CalendarCarousel.vue b/ui/src/components/calendar/CalendarCarousel.vue index a559a1b..5659f00 100644 --- a/ui/src/components/calendar/CalendarCarousel.vue +++ b/ui/src/components/calendar/CalendarCarousel.vue @@ -31,7 +31,7 @@ export default class CalendarCarousel extends Vue { private readonly speed!: number; @Prop({ required: true }) - private readonly data!: Array; + private readonly data!: CalendarData[]; @Ref("main") private readonly _main?: Vue; @@ -64,7 +64,7 @@ export default class CalendarCarousel extends Vue { clearInterval(this.interval); } - private get calendars(): Array { + private get calendars(): CalendarModel[] { let arr = []; for (const json_data of this.data) { diff --git a/ui/src/components/calendar/CalendarModel.ts b/ui/src/components/calendar/CalendarModel.ts index 984e516..eadc836 100644 --- a/ui/src/components/calendar/CalendarModel.ts +++ b/ui/src/components/calendar/CalendarModel.ts @@ -3,12 +3,12 @@ import { EventData, EventModel } from "./EventModel"; export type CalendarData = { title: string; - events: Array; + events: EventData[]; }; export class CalendarModel extends Model { public title: string; - public events: Array; + public events: EventModel[]; public constructor(json_data: CalendarData) { super(); diff --git a/ui/src/components/calendar/EventItem.vue b/ui/src/components/calendar/EventItem.vue index 5260868..1bc6ac7 100644 --- a/ui/src/components/calendar/EventItem.vue +++ b/ui/src/components/calendar/EventItem.vue @@ -49,7 +49,7 @@ export default class EventItem extends Vue { ); // decide which duration units to include - let units: Array = ["hours"]; + let units: (keyof DurationLikeObject)[] = ["hours"]; if (this.event.duration.as("days") >= 1) { // include days if duration is at least one day