VueDX Dynamic slots not recognized properly
TheDutchCoder opened this issue · 1 comments
TheDutchCoder commented
Describe the bug
Consider the following code:
Running for /Users/reinierkaper/projects/creativelayer/chalk-ui
src/components/data/table/table.vue:29:21 - error VueDX/TS2339: Property '$slots' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: Partial<{ error: boolean; rowAction: Function; loading: boolean; borderless: boolean; defaultFilter: string; defaultOrder: string; }> & Pick<...>; ... 13 more ...; order: string; }'.
26 | >{{ header }}</span>
27 | <span
28 | data-table-sortArrow
| ~~~~~~
29 | class="w-4 text-center"
30 | >
Edit: this error is actually bubbling up from a dynamic slot, VueDX wrongly highlights this line but it wasn't related. See my below screenshot for the real issue
To Reproduce
- Create dynamically named slots
- Run
vuedx-typecheck
and it will fail on those slots.
Expected behavior
Not to throw errors.
Info (please complete the following information):
- OS Mac 11.2.1
- IDE VSCode
- TypeScript Version 4.1.3
- Vue Version latest
TheDutchCoder commented