maoberlehner / vue-lazy-hydration

Lazy Hydration of Server-Side Rendered Vue.js Components
MIT License
1.18k stars 52 forks source link

feat: typescript types #28

Open aldarund opened 4 years ago

aldarund commented 4 years ago

fixes #26

maoberlehner commented 4 years ago

Hello @aldarund! Thank you for your contribution!

Do you have any experience how other projects deal with the challenge of keeping the types and the code in sync? If I or somebody else makes a change which breaks the compatibility with the types can we somehow detect this automatically? Thx!

aldarund commented 4 years ago

I`m not aware of such way, that would be anyhow reliable. Unless the lib itself written in typescript :) Although i dont have a lot of typescript experience.

maoberlehner commented 4 years ago

Sorry, but this means I can't merge this. Maintaining Open Source projects is a lot of work and unfortunately only very few people actively create pull requests like you do (Thanks for that!).

Having to keep the types in sync, every time I change the code, makes it even more work for me.

Only way is that you promise me that I can ping you every time I make an update and you keep the types in sync. Otherwise this either complicates my work or the types quickly are out of sync and become useless or even harmful.

aldarund commented 4 years ago

You can ping me :)

andynunes commented 4 years ago

Thanks @aldarund ! You rock.

@maoberlehner If you merge this, I can finally convert some of my components to use TypeScript that really need it 😀

maoberlehner commented 4 years ago

@aldarund sounds good :)

simllll commented 4 years ago

Anything we can do to get this into the core too? I would offer to refactor the whole library to typsescript. Which would make your question obsolete for maintaing the types ;)

OrkhanAlikhanov commented 3 years ago

how other projects deal with the challenge of keeping the types and the code in sync?

@maoberlehner In Vue 2.x they kept them in sync manually like a lot of other repo owners do. In vue 3, they use typescript directly.