sortablejs-vue3 icon indicating copy to clipboard operation
sortablejs-vue3 copied to clipboard

Support generic type parameters

Open ethanchristensen01 opened this issue 5 months ago • 3 comments

This update enables type checking scoped slots, and by extension, lets developers get type completions while writing the #item slot.

There is a "breaking change" to consider here: to access the type of the component, we can no longer use InstanceType<typeof sortable>, because it doesn't work with generic components. We have to replace InstanceType with ComponentExposed as described in this issue: Cannot use InstanceType<typeof Comp>> on generic components.

This requires adding 'vue-component-type-helpers' (from the official Vue Language Tools repository) as a dev dependency.

ethanchristensen01 avatar Sep 20 '24 23:09 ethanchristensen01