Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strict-event-emitter

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strict-event-emitter - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

8

lib/StrictEventTarget.d.ts
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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc