IntelliTect / vuetify2-component-types

Component types for Volar intellisense with Vuetify 2 and Vue 2.7
11 stars 1 forks source link

Add types of emits #1

Closed kingyue737 closed 1 year ago

kingyue737 commented 1 year ago

Description

As some upstream type bugs https://github.com/vuejs/language-tools/issues/1855 have been resolved, now we can have intellisense of events in SFC templates.

image

image

Not fully tested as I only use a small subset of all vuetify component events in my projects. Help wanted XD

Ensure that your pull request has followed all the steps below:

ascott18 commented 1 year ago

Awesome - thank you!

johuhype commented 1 year ago

Could you please have a look at v-calendar. At least the events for @change, @click:event, @click:date, @click:more are not getting processed correctly, altough they seem to be defined correctly on the documentation page.

e.g. Type '(range: { start: CalendarTimestamp; end: CalendarTimestamp; }) => void' is not assignable to type '(...args: unknown[]) => void'. Types of parameters 'range' and 'args' are incompatible.ts(2322) (property) 'change': ((...args: unknown[]) => void) | undefined

kingyue737 commented 1 year ago

@johuhype sorry I wasn't notified as I unsubscribed this PR after closed, I will check this issue this week

kingyue737 commented 1 year ago

seems to be an upstream bug https://github.com/vuejs/language-tools/issues/3719