import { Element as CustomElement } from "./element"; import { WcSlot } from "./slot"; export type SlotChanges = { /** * List of direct children of the custom element. */ readonly added: ReadonlyArray; /** * List of children that were removed from the custom element. */ readonly removed: ReadonlyArray; /** * List of direct children of the custom element which content has * changed. */ readonly contentChanged: ReadonlyArray; /** * List of direct children of the custom element which attributes * have changed. */ readonly attributeChanged: ReadonlyArray; }; export type FinalChanges = SlotChanges; export type OnSlotChangeCallback = (changes: SlotChanges) => void; export type SlottedOptions = { filter?: string | ((elem: WcSlot) => boolean); /** * Callback that allows to decide whether the custom element should * re-render on given slot changes. */ shouldRequestUpdate?: (current: WcSlot[], changes: SlotChanges) => boolean; }; export declare function Slotted(opts?: SlottedOptions): (accessor: ClassAccessorDecoratorTarget, context: ClassAccessorDecoratorContext) => ClassAccessorDecoratorResult;