vue-functional-calendar
vue-functional-calendar copied to clipboard
Could not find a declaration file for module 'vue-functional-calendar'.
I'm using the functional calendar in vuejs application in combination with typescript. I'm getting this error "Could not find a declaration file for module 'vue-functional-calendar'." I've tried to add custom .d.ts file but still there is an error from eslint and build fails.
@selvievski
Try it like this:
- Create a
vue-functional-calendar.d.ts
file and put it somewhere in your project - Declare your typing in the file, for eg.
declare module 'vue-functional-calendar' {
import Vue from 'vue';
class FunctionalCalendar extends Vue {
// your types here
}
export = FunctionalCalendar;
}
- Then go to your
tsconfig.json
file and addtypeRoots
:
{
"compilerOptions": {
"typeRoots": [
"./node_modules/@types",
"./src/types/vue-functional-calendar.d.ts",
]
},
}
Hello. Thanks for your feedback. Now I don't have time to deal with the calendar. Please create pull requests, I will appreciate it, it will be useful for the community.