johndatserakis/vue-simple-context-menu

type definition

xFeXx opened this issue · 6 comments

xFeXx commented

Hi,

thank you for the neat context menu!
Are there any plans to have type definition? That would be really awesome!

Thanks in advance.

Hi there! Hmm well I can perhaps take a look at this at some point. I'm a little booked at the moment, but if I get around to it I'll update here. Thank you.

xFeXx commented

Thanks in advance 👍

+1

v4.0.1 has now been released with Vue 3 support. If I find time I will attempt to add TypeScript to the project. Sorry just been super swamped for a while now. I will review a PR for sure if someone puts one up before I do.

To update - currently there are no plans to upgrade this component to use TypeScript directly.

I think the best way to use this component in a TypeScript project is to add a simple declarations file. You can then additionally add typing for the methods and variables intended for use.

At that point, I could place that directly in this project for others to use. It wouldn't be a "real" TypeScript project, but it would be something.

My apologies to anyone looking for this. I'm a huge TypeScript fan, it's just these older "options" API Vue libraries are tough to use with TypeScript from my experience. I think a manually declaration file is a better method at this point.

xFeXx commented

Thank you for the update @johndatserakis.
I'll continue using my "fake" declaration then.