vue-lazy-hydration icon indicating copy to clipboard operation
vue-lazy-hydration copied to clipboard

feat: typescript types

Open aldarund opened this issue 4 years ago • 8 comments

fixes #26

aldarund avatar Oct 06 '19 21:10 aldarund

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!

maoberlehner avatar Oct 09 '19 11:10 maoberlehner

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.

aldarund avatar Oct 09 '19 12:10 aldarund

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.

maoberlehner avatar Oct 20 '19 05:10 maoberlehner

You can ping me :)

aldarund avatar Oct 28 '19 19:10 aldarund

Thanks @aldarund ! You rock.

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

andynunes avatar Nov 01 '19 23:11 andynunes

@aldarund sounds good :)

maoberlehner avatar Nov 07 '19 13:11 maoberlehner

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 ;)

simllll avatar May 01 '20 21:05 simllll

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.

OrkhanAlikhanov avatar Jun 12 '21 00:06 OrkhanAlikhanov