MOBILE-2314 npm: Patch event-target-shim
The TypeScript declarations were not compatible with the version we're usingmain
parent
495d395beb
commit
b0fe99341b
|
@ -0,0 +1,30 @@
|
|||
diff --git a/node_modules/event-target-shim/index.d.ts b/node_modules/event-target-shim/index.d.ts
|
||||
index 7a5bfc7..ba5e7d8 100644
|
||||
--- a/node_modules/event-target-shim/index.d.ts
|
||||
+++ b/node_modules/event-target-shim/index.d.ts
|
||||
@@ -359,7 +359,7 @@ export declare namespace defineCustomEventTarget {
|
||||
/**
|
||||
* The interface of CustomEventTarget.
|
||||
*/
|
||||
- type CustomEventTarget<TEventMap extends Record<string, Event>, TMode extends "standard" | "strict"> = EventTarget<TEventMap, TMode> & defineEventAttribute.EventAttributes<any, TEventMap>;
|
||||
+ type CustomEventTarget<TEventMap extends Record<string, Event>, TMode extends "standard" | "strict"> = EventTarget<TEventMap, TMode> & defineEventAttribute.EventAttributes<any>;
|
||||
}
|
||||
/**
|
||||
* Define an event attribute.
|
||||
@@ -368,14 +368,12 @@ export declare namespace defineCustomEventTarget {
|
||||
* @param _eventClass Unused, but to infer `Event` class type.
|
||||
* @deprecated Use `getEventAttributeValue`/`setEventAttributeValue` pair on your derived class instead because of static analysis friendly.
|
||||
*/
|
||||
-export declare function defineEventAttribute<TEventTarget extends EventTarget, TEventType extends string, TEventConstrucor extends typeof Event>(target: TEventTarget, type: TEventType, _eventClass?: TEventConstrucor): asserts target is TEventTarget & defineEventAttribute.EventAttributes<TEventTarget, Record<TEventType, InstanceType<TEventConstrucor>>>;
|
||||
+export declare function defineEventAttribute<TEventTarget extends EventTarget, TEventType extends string, TEventConstrucor extends typeof Event>(target: TEventTarget, type: TEventType, _eventClass?: TEventConstrucor): asserts target is TEventTarget & defineEventAttribute.EventAttributes<TEventTarget>;
|
||||
export declare namespace defineEventAttribute {
|
||||
/**
|
||||
* Definition of event attributes.
|
||||
*/
|
||||
- type EventAttributes<TEventTarget extends EventTarget<any, any>, TEventMap extends Record<string, Event>> = {
|
||||
- [P in string & keyof TEventMap as `on${P}`]: EventTarget.CallbackFunction<TEventTarget, TEventMap[P]> | null;
|
||||
- };
|
||||
+ type EventAttributes<TEventTarget extends EventTarget<any, any>> = Record<string, EventTarget.CallbackFunction<TEventTarget, any> | null>;
|
||||
}
|
||||
/**
|
||||
* Set the warning handler.
|
Loading…
Reference in New Issue