sumcumo / vue-datepicker

A datepicker Vue component. Compatible with Vue 2.x.
https://sumcumo.github.io/vue-datepicker/
Apache License 2.0
75 stars 22 forks source link

TypeScript support #33

Open abezulski opened 3 years ago

abezulski commented 3 years ago

More of a question than issue: is there a types definition for TypeScript or do I need to create my own d.ts file as a workaround?

MrWook commented 3 years ago

I'm sorry but this project is not written in typescript therefore there is no typescript declaration file. It would be a alot of work to move to typescript to generate the declaration files but it could be done.

Maybe after the two big changes that are currently open.

mst101 commented 3 years ago

I'm just learning Typescript and am thinking of having a go at migrating this project across, provided the maintainer is in favour of doing so (@MrWook - please let me know).

@abezulski - have you already made a start on this? If so, any chance you could share your code? Thanks

mst101 commented 3 years ago

Actually @MrWook - rather than converting to typescript, would you prefer if I had a go at migrating the project to Vue 3? What's more important? I want to learn both...

MrWook commented 3 years ago

@mst101 i added a basic typescript setup https://github.com/sumcumo/vue-datepicker/pull/127 feel free to check it out to get a grasp about vue + typescript. A basic rule is that you never want to have any types. Always add a type for something.

Let's make little steps towards vue3 even if it is out quite a while now a lot of projects are on vue2 or starting with vue2. So let's start with migrating to typescript and then adding something like https://github.com/vueuse/vue-demi to build for vue2 and vue3

mryellow commented 1 month ago

No one needs TypeScript getting in their way.