-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript support? #31
Comments
Are you looking for TypeScript version as described here? |
Right now, trying to import
I assume they mean this, in any case it's the error that brought me here :) |
Any news? |
We are missing types for fullcalendar vue |
Would be really nice if you could provide the types declaration file for typescript support! 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. :) |
Any news yet? |
"Latest commit af28b03 on Aug 12, 2019" - is anyone still maintaining this project? |
Having an issue with this as well, is there a plan to add type definitions? |
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. |
A workaround would be to make a typescript definition file where you simply do something like this:
That way your code compiles, but you still don't have "real" typescript support. |
If anyone is looking for type definitions I have submitted some to DefinitelyTyped https://www.npmjs.com/package/@types/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 Please try these out and report any problems in a separate issue. Thank you! |
No description provided.
The text was updated successfully, but these errors were encountered: