@arcmantle/library
    Preparing search index...

    Function emitEvent

    • Emits a custom event with more convenient defaults.

      Gets type information from the global type HTMLElementEventMap

      Type Parameters

      • T extends HTMLElementEventMap
      • R extends keyof HTMLElementEventMap
      • K extends string = R

      Parameters

      • el: HTMLElement
      • name: R | K
      • Optionaloptions: T[R] extends CustomEvent<any>
            ? CustomEventInit<any[any]["detail"]>
            : CustomEventInit<any>

      Returns CustomEvent<T[R] extends CustomEvent<any> ? any[any]["detail"] : any>