Skip to content

Commit ff8170c

Browse files
committed
fix: add slot dictionary type as typescript string index assignment workaround
1 parent 03b4423 commit ff8170c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/mount.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@ import { stubComponents } from './stubs'
2929

3030
type Slot = VNode | string | { render: Function }
3131

32+
type SlotDictionary = {
33+
[key: string]: Slot
34+
}
35+
3236
interface MountingOptions<Props> {
3337
data?: () => Record<string, unknown>
3438
props?: Props
3539
attrs?: Record<string, unknown>
36-
slots?: {
40+
slots?: SlotDictionary & {
3741
default?: Slot
38-
[key: string]: Slot
3942
}
4043
global?: GlobalMountOptions
4144
attachTo?: HTMLElement | string

0 commit comments

Comments
 (0)