dacha
    Preparing search index...

    Type Alias EventPayload<T, K>

    EventPayload: K extends keyof T
        ? Record<string, never> extends Omit<
            T[K],
            "type"
            | "target"
            | "currentTarget"
            | "stopPropagation",
        >
            ? [
                Omit<T[K], "type" | "target" | "currentTarget" | "stopPropagation">?,
            ]
            : [Omit<T[K], "type" | "target" | "currentTarget" | "stopPropagation">]
        : [Record<string, unknown>?]

    The payload argument of dispatchEvent for event K in event map T. It is the event type without the fields the engine sets: type, target, currentTarget and stopPropagation. The argument is optional when the event has no payload.

    Type Parameters

    • T
    • K