Skip to content

Commit

Permalink
fix(typings): fix Manager.add & IEventManager.add types
Browse files Browse the repository at this point in the history
  • Loading branch information
ddubrava committed Oct 6, 2022
1 parent 81ed025 commit 077a705
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1357,16 +1357,9 @@ declare namespace ymaps {
parent?: IEventManager | undefined;
});

add<K extends keyof EventMap>(
types: K,
callback: (event: IEvent<EventMap[K], TargetGeometry>) => void,
context?: object,
priority?: number,
): this;

add(
types: string[][] | string[] | string,
callback: (event: IEvent<{}, TargetGeometry>) => void,
callback: (event: IEvent) => void,
context?: object,
priority?: number,
): this;
Expand Down Expand Up @@ -5169,13 +5162,6 @@ declare namespace ymaps {
}

interface IEventManager<TargetGeometry = {}> extends IEventTrigger {
add<K extends keyof EventMap>(
types: K,
callback: (event: IEvent<EventMap[K], TargetGeometry>) => void,
context?: object,
priority?: number,
): this;

add(
types: string[][] | string[] | string,
callback: (event: IEvent) => void,
Expand Down

0 comments on commit 077a705

Please sign in to comment.