From 3a6890e3cb41079c96f9f148f1d244fdf0f864a7 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 16 Mar 2020 22:49:27 -0400 Subject: [PATCH] Appropriately type calendarOptions and calendars list --- package.json | 1 + src/App.vue | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9ebc617..2ea6cd2 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@babel/core": "^7.8.7", "@babel/plugin-transform-runtime": "^7.8.3", "@babel/preset-env": "^7.8.7", + "@types/fullcalendar__vue": "^4.4.0", "@vue/component-compiler-utils": "^3.0.0", "sass": "^1.23.1", "typescript": "^3.6.4", diff --git a/src/App.vue b/src/App.vue index 5022488..3dba401 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,6 +7,7 @@ import { Vue, Component, Prop, Watch } from 'vue-property-decorator'; import equicolor from 'equicolor'; import FullCalendar from '@fullcalendar/vue'; +import { CalendarProps } from '@fullcalendar/vue/options'; import timeGridPlugin from '@fullcalendar/timegrid'; import googleCalendarPlugin from '@fullcalendar/google-calendar'; @@ -14,7 +15,7 @@ import '@fullcalendar/core/main.css'; import '@fullcalendar/daygrid/main.css'; import '@fullcalendar/timegrid/main.css'; -const calendars = { +const calendars: { [key: string]: string } = { computer_lab: '6mmjp85e4732ru6skf1dda54ls@group.calendar.google.com', electronics: '1g8atbdschshrg2inf162rcqt4@group.calendar.google.com', wood_shop: '4unv3ia1n9mc9u31n2n5lv8nd8@group.calendar.google.com', @@ -31,7 +32,7 @@ const colors = equicolor.findNextColors( @Component({ components: { FullCalendar } }) export default class App extends Vue { - calendarOptions = { + calendarOptions: CalendarProps = { plugins: [timeGridPlugin, googleCalendarPlugin], allDaySlot: false, nowIndicator: true,