From ff8170c047a710e5f257cdd94f7ca8c7e0fd6bc8 Mon Sep 17 00:00:00 2001 From: Chris Vincent Date: Mon, 11 May 2020 03:43:29 -0600 Subject: [PATCH] fix: add slot dictionary type as typescript string index assignment workaround --- src/mount.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mount.ts b/src/mount.ts index fe73ddf9f..a93c85d33 100644 --- a/src/mount.ts +++ b/src/mount.ts @@ -29,13 +29,16 @@ import { stubComponents } from './stubs' type Slot = VNode | string | { render: Function } +type SlotDictionary = { + [key: string]: Slot +} + interface MountingOptions { data?: () => Record props?: Props attrs?: Record - slots?: { + slots?: SlotDictionary & { default?: Slot - [key: string]: Slot } global?: GlobalMountOptions attachTo?: HTMLElement | string