Comments (12)
Right now, trying to import @fullcalendar/vue
results in the following error:
TS7016: Could not find a declaration file for module '@fullcalendar/vue'. '/[...]/node_modules/@fullcalendar/vue/main.umd.js' implicitly has an 'any' type.
I assume they mean this, in any case it's the error that brought me here :)
from fullcalendar-vue.
We are missing types for fullcalendar vue
from fullcalendar-vue.
If anyone is looking for type definitions I have submitted some to DefinitelyTyped https://www.npmjs.com/package/@types/fullcalendar__vue
from fullcalendar-vue.
Are you looking for TypeScript version as described here?
https://vuejs.org/v2/guide/typescript.html
from fullcalendar-vue.
@nadershamma, thank you so much for writing those definitions! They really helped me get oriented while thinking about this issue.
After a bit of investigation, I decided to rewrite the fullcalendar vue connector in TypeScript (a language I love) and have the definitions be auto-generated. Just like what others have suggested in this thread. I already do something like this for the React connector.
This is all available in the release candidate.
Package info: https://www.npmjs.com/package/@fullcalendar/vue/v/5.0.0-rc
Example project: https://github.com/fullcalendar/fullcalendar-example-projects/tree/v5/vue-typescript
Please try these out and report any problems in a separate issue. Thank you!
from fullcalendar-vue.
Any news?
from fullcalendar-vue.
Would be really nice if you could provide the types declaration file for typescript support!
Or you write your vue components in a typescript. ;)
Instead of
<script>
props: {
user: {
type: Object
, required: true
}
}
, data: () {
return {}
}
</script>
<script lang="ts">
import Vue from 'vue'
interface User {
firstName: string
lastName: number
}
export default Vue.extend({
props: {
user: {
type: Object,
required: true
} as PropOptions<User>
}
, data: () {
return {}
}
})
You already found the right link. :)
Thank you for your great work so far. :)
from fullcalendar-vue.
Any news yet?
from fullcalendar-vue.
"Latest commit af28b03 on Aug 12, 2019" - is anyone still maintaining this project?
from fullcalendar-vue.
Having an issue with this as well, is there a plan to add type definitions?
from fullcalendar-vue.
I decided to give this a go, first time writing types definition for a package. I have it working in our project. I'll be honest first time I have written a types defs, was a lot of pocking around until the IDE and compiler stopped complaining but it may not be the right way.
There is an issue around using the $refs api with class based vues, see this stackoverflow thread
So I created an interface type in the defs called FullCalendarComponent to resolve this.
My question now is where do I place these files? shall I stick them in this repo in src and you bundle it up into the package you have on npm or do we create a new package? The former seems the easiest; will probably need a little help with the latter.
from fullcalendar-vue.
A workaround would be to make a typescript definition file where you simply do something like this:
declare module '@fullcalendar/vue';
That way your code compiles, but you still don't have "real" typescript support.
from fullcalendar-vue.
Related Issues (20)
- i found a bug in Timeline ,when set eventMaxStack.i have a demo address,help me please. HOT 1
- resourceTimelineDay v-slot resourceLabelContent only work with column one HOT 2
- Add support for Vue Router and Vuex HOT 5
- Integration for nuxt HOT 1
- JSX issue when using in Vue 3 with Typescript HOT 8
- TypeError: Cannot set properties of undefined (setting 'VueFullcalendar') HOT 1
- Vue3: Custom event component issue: No root instance for app HOT 1
- More than 1 full calendar on the same page. HOT 1
- Event change class between determinate hours HOT 1
- Render `eventContent` in the context of the main Vue application HOT 1
- Using slots breaks optimized rendering HOT 1
- __vite_ssr_import_1__ is not defined when trying to implement FullCalendar in nuxt3 project HOT 1
- CDN triggers "Uncaught TypeError: d is undefined" and so doesn't seem to run HOT 2
- Global.vue is not a function HOT 1
- Importing fullcalendar component breaks type checking with vue-tsc HOT 4
- Horizontal scroll position on timelineMonth resets when navigating to the next day HOT 1
- dayMinWidth: No ScrollGrid implementation HOT 1
- Createapp() called for every event in fullcalendar vue3 HOT 5
- fullcalender not showing time correctly on daygrid view HOT 2
- This issue tracker has moved
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fullcalendar-vue.