Appropriately type calendarOptions and calendars list

This commit is contained in:
Adam Goldsmith 2020-03-16 22:49:27 -04:00
parent 959cd7e8b0
commit 3a6890e3cb
2 changed files with 4 additions and 2 deletions

View File

@ -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",

View File

@ -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,