Skip to content

Commit a168318

Browse files
committed
refactor(NcChip): use defineSlots for proper slot definition
This resolves 2 errors reported by Typescript when building the package (missing "private" type exports during the declaration creation). Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent d81f990 commit a168318

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/components/NcChip/NcChip.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default {
111111

112112
<script setup lang="ts">
113113
import { mdiClose } from '@mdi/js'
114-
import { computed, useSlots } from 'vue'
114+
import { computed } from 'vue'
115115
import { t } from '../../l10n.js'
116116
117117
import NcActions from '../NcActions/NcActions.vue'
@@ -162,8 +162,15 @@ const props = withDefaults(defineProps<{
162162
variant: 'secondary',
163163
})
164164
165-
const emit = defineEmits(['close'])
166-
const slots = useSlots()
165+
const emit = defineEmits<{
166+
close: []
167+
}>()
168+
169+
const slots = defineSlots<{
170+
actions(): unknown
171+
default(): unknown
172+
icon(): unknown
173+
}>()
167174
168175
const canClose = computed(() => !props.noClose)
169176
const hasActions = () => Boolean(slots.actions?.())

0 commit comments

Comments
 (0)