strict-event-emitter
Advanced tools
Comparing version 0.3.0 to 0.3.1
import { EventMapType } from './StrictEventEmitter'; | ||
export declare type StrictListener<Data> = (data: Data) => void; | ||
export declare type StrictListener<Type extends string, Data> = (message: StrictMessageEvent<Type, Data>) => void; | ||
/** | ||
@@ -7,5 +7,5 @@ * A type-safe implementation of the `EventTarget` interface. | ||
export declare class StrictEventTarget<EventMap extends EventMapType> extends EventTarget { | ||
dispatchEvent<Event extends keyof EventMap>(event: StrictMessageEvent<Event & string, EventMap[Event]>): boolean; | ||
addEventListener<Type extends keyof EventMap>(type: Type & string, listener: StrictListener<EventMap[Type]>, options?: boolean | AddEventListenerOptions): void; | ||
removeEventListener<Type extends keyof EventMap>(type: Type & string, listener: StrictListener<EventMap[Type]>, options?: boolean | EventListenerOptions): void; | ||
dispatchEvent<Event extends keyof EventMap & string>(event: StrictMessageEvent<Event, EventMap[Event]>): boolean; | ||
addEventListener<Type extends keyof EventMap>(type: Type, listener: StrictListener<Type & string, EventMap[Type]>, options?: boolean | AddEventListenerOptions): void; | ||
removeEventListener<Type extends keyof EventMap>(type: Type, listener: StrictListener<Type & string, EventMap[Type]>, options?: boolean | EventListenerOptions): void; | ||
} | ||
@@ -12,0 +12,0 @@ /** |
{ | ||
"name": "strict-event-emitter", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Type-safe \"EventEmitter\" for everyday use", | ||
@@ -11,2 +11,3 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"dev": "tsc -w", | ||
"test": "jest", | ||
@@ -13,0 +14,0 @@ "test:ts": "tsc -p test/typings.tsconfig.json", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8788