vue3-touch-events icon indicating copy to clipboard operation
vue3-touch-events copied to clipboard

Argument of type '[]' is not assignable to parameter of type 'never'.

Open cdauth opened this issue 1 year ago • 1 comments

I'm trying to use this plugin with Vue 3.3 on TypeScript.

Using createApp(Root).use(Vue3TouchEvents) produces the error Argument of type '[]' is not assignable to parameter of type 'never'..

Looking at the types, the type of Vue3TouchEvents is Plugin<Vue3TouchEventsOptions & undefined>, which resolves to Plugin<never>. I believe the type needs to be Plugin<Vue3TouchEventsOptions | undefined>, and then it can be used as .use(Vue3TouchEvents, {}).

As a workaround for now, for some reason it seems to work to do .use<Vue3TouchEventsOptions>(Vue3TouchEvents, {}) (but not without the options argument).

cdauth avatar May 23 '24 10:05 cdauth

Could you please file a PR with this fix? Thanks in advance.

robinrodricks avatar May 30 '24 06:05 robinrodricks