import { LightningSlotElement } from "typings/custom"; export const isSlotEmpty = (e: LightningSlotElement) => // @ts-ignore e.target.assignedElements().length === 0; const stopPropagation = (event: Event) => { event.stopPropagation(); }; export const stopPropagationOnSlotted = (e: LightningSlotElement) => { // @ts-ignore const slot = e.target; slot.assignedElements().forEach((el: HTMLElement) => { el.addEventListener("click", stopPropagation); }); };