testing-library / vue-testing-library

🦎 Simple and complete Vue.js testing utilities that encourage good testing practices.
http://testing-library.com/vue
MIT License
1.08k stars 109 forks source link

Type safe render options (props, slots, emits) #305

Closed sand4rt closed 6 months ago

sand4rt commented 1 year ago

Vue released a library (https://www.npmjs.com/package/vue-component-type-helpers) with some type helpers like ComponentProps<typeof Component>, ComponentSlots<typeof Component> and ComponentEmits<typeof Component> which could make the render options type safe.

VTU also recently integrated this library: https://github.com/vuejs/test-utils/blob/main/test-dts/mount.d-test.ts#L60.

related to: https://github.com/testing-library/vue-testing-library/issues/228 and https://github.com/microsoft/playwright/pull/23151

afontcu commented 6 months ago

Fixed in #314