sortablejs-vue3
sortablejs-vue3 copied to clipboard
Support generic type parameters
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
This requires adding 'vue-component-type-helpers' (from the official Vue Language Tools repository) as a dev dependency.