UNPKG

element-vir

Version:

Heroic. Reactive. Declarative. Type safe. Web components without compromise.

16 lines (15 loc) 508 B
import { type ArrayElement } from '@augment-vir/common'; /** * Type safe mapping of slot names to themselves. * * @category Internal */ export type SlotNameMap<SlotNames extends ReadonlyArray<string>> = Readonly<{ [SlotName in ArrayElement<SlotNames>]: SlotName; }>; /** * Converts an array of slot names into a `SlotNameMap`. * * @category Internal */ export declare function createSlotNamesMap<SlotNames extends ReadonlyArray<string>>(slotNames: SlotNames | undefined): SlotNameMap<SlotNames>;