I’m upgrading Fullcalendar from 5 to 6, I use Vue 2.6.12 with Webpack & Typescript.
The application runs fine on dev but it’s not building:
vue-cli-service build
ERROR in /usr/srv/client/node_modules/@fullcalendar/vue/dist/FullCalendar.d.ts(4,29):
4:29 Generic type 'ExtendedVue' requires 5 type argument(s).
2 | import { Calendar, CalendarOptions } from '@fullcalendar/core';
3 | import { CustomRendering } from '@fullcalendar/core/internal';
> 4 | declare const FullCalendar: import("vue/types/vue.js").ExtendedVue<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>, {
| ^
5 | renderId: number;
6 | customRenderingMap: Map<string, CustomRendering<any>>;
7 | }, {
Complaining about ExtendedVue
expects 5 type arguments and I indeed count 8 here
Original type file:
import Vue from 'vue';
import { Calendar, CalendarOptions } from '@fullcalendar/core';
import { CustomRendering } from '@fullcalendar/core/internal';
declare const FullCalendar: import("vue/types/vue.js").ExtendedVue<Vue<Record<string, any>, Record<string, any>, never, never, (event: string, ...args: any[]) => Vue<Record<string, any>, Record<string, any>, never, never, any>>, {
renderId: number;
customRenderingMap: Map<string, CustomRendering<any>>;
}, {
getApi(): Calendar;
buildOptions(suppliedOptions: CalendarOptions | undefined): CalendarOptions;
}, unknown, {
options: CalendarOptions;
}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin>;
export default FullCalendar;
package.json
extract:
{
"dependencies": {
"@fullcalendar/core": "^6.1.15",
"@fullcalendar/daygrid": "^6.1.15",
"@fullcalendar/interaction": "^6.1.15",
"@fullcalendar/timegrid": "^6.1.15",
"@fullcalendar/vue": "^6.1.15",
"vue": "^2.6.10",
//...
},
}
What can I do about that ?
Please don’t tell me I need to go Vue 3, It’d be too much of a PITA for my project and it’s not supposed to be an issue (5 to 6 migration guide)