Skip to content

Explore inferring getEventStreamFromElement's generic with overrides #245

@appsforartists

Description

@appsforartists

It probably looks something like this:

export function getEventStreamFromElement<U extends Event = Event>(type: string, element: Element, eventListenerOptions?: AddEventListenerOptions): ObservableWithMotionOperators<U>;
export function getEventStreamFromElement<K extends keyof GlobalEventHandlersEventMap>(type: K, element: Element, eventListenerOptions?: AddEventListenerOptions): ObservableWithMotionOperators<GlobalEventHandlersEventMap[K]>;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions