antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
544 stars 39 forks source link

Initial Typescript setup #122

Closed luc122c closed 11 months ago

luc122c commented 11 months ago

See #26. This PR introduces inital Typescript support. The objective is for declaration files (.d.ts) to be emitted for the exising JS files using JSDocs. This allows for an incremental Typescript conversion.

DerrikMilligan commented 11 months ago

There is also the @types repo that we can have the types in and have someone run npm install --save-dev @types/wave-ui. I've been working on building some types based upon what's in the Vue files and the documentation and hope to have a pull request there within a week or so which is also an option.

I will however have to be filling in a lot of gaps where there is not documentation or types currently. And it may be a better path to try and just add JSDoc everywhere to output the correct types. I'm not sure what the limitations are using this with Vue components though. Can it build types for all the props, emits, and the Vue component itself?

antoniandre commented 11 months ago

Thanks for this PR @luc122c! it's a good start. I'll continue the discussion in #26

antoniandre commented 11 months ago

This work has been added in the merged #124 PR. Thanks again for leading the way!