Emit a custom event with the given detail

0.12.0

  • Type Parameters

    • T

    Parameters

    • type: string

      event type to emit

    • detail: T | (element: Element) => T

      event detail or provider function

    Returns <P extends ComponentProps>(host: Component<P>, target?: Element) => void