[Bug] types in 5.0.1-rc.33
Vue Cal Version
5.0.1-rc.33
Vue Version
3.5.22
Additional Settings
- [x] Using Composition API
- [ ] Using SSR
Describe the Bug & Expected Behavior
Hi, thanks for adding types in rc33. I have problems using them as they are now mentioned in package.json. If i use them like so:
import {VueCal, type VueCalView} from 'vue-cal'
this shows an error:
Could not find a declaration file for module 'vue-cal'. '/..../node_modules/vue-cal/dist/vue-cal.es.js' implicitly has an 'any' type.
There are types at '/.../node_modules/vue-cal/dist/vue-cal.d.ts',
but this result could not be resolved when
respecting package.json "exports".
The 'vue-cal' library may need to update its package.json
or typings.ts-plugin(7016)
Provide a Reproduction Link
Modifying vue-cal's package.json by adding the types entry to the exports object would do the trick:
"exports": {
".": {
"import": "./dist/vue-cal.es.js",
"require": "./dist/vue-cal.cjs.js",
"types": "./dist/vue-cal.d.ts"
},
Am i missing something here?
Hi,
I also tried this and ran into the same problems. Modifying the lines as suggested in the node_modules/vue-cal/package.json did resolve the issue locally.
I also noted that the type defined for the background property of the VueCalEvent interface does not match the documentation, it is a number in ./dist/vue-cal.d.ts but a boolean in the API documentation
A Vue JS full calendar, no dependency, no BS. 🤘
No TypeScript, no tests 😢