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

@solid-primitives/event-listener

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid-primitives/event-listener - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

4

dist/index.d.ts

@@ -52,4 +52,4 @@ import { MaybeAccessor, Many, Directive } from '@solid-primitives/utils';

*/
declare function createEventListener<Target extends TargetWithEventMap, EventMap extends EventMapOf<Target>, EventType extends keyof EventMap>(target: MaybeAccessor<Many<Target>>, type: MaybeAccessor<Many<EventType>>, handler: (event: EventMap[EventType]) => void, options?: EventListenerOptions): void;
declare function createEventListener<EventMap extends Record<string, Event>, EventType extends keyof EventMap = keyof EventMap>(target: MaybeAccessor<Many<EventTarget>>, type: MaybeAccessor<Many<EventType>>, handler: (event: EventMap[EventType]) => void, options?: EventListenerOptions): void;
declare function createEventListener<Target extends TargetWithEventMap, EventMap extends EventMapOf<Target>, EventType extends keyof EventMap>(target: MaybeAccessor<Many<Target | undefined>>, type: MaybeAccessor<Many<EventType>>, handler: (event: EventMap[EventType]) => void, options?: EventListenerOptions): void;
declare function createEventListener<EventMap extends Record<string, Event>, EventType extends keyof EventMap = keyof EventMap>(target: MaybeAccessor<Many<EventTarget | undefined>>, type: MaybeAccessor<Many<EventType>>, handler: (event: EventMap[EventType]) => void, options?: EventListenerOptions): void;
/**

@@ -56,0 +56,0 @@ * Provides an reactive signal of last captured event.

{
"name": "@solid-primitives/event-listener",
"version": "2.0.0",
"version": "2.1.0",
"description": "SolidJS Primitives to manage creating event listeners.",

@@ -38,3 +38,3 @@ "author": "David Di Biase <dave.dibiase@gmail.com>",

"start": "vite serve dev --host",
"dev": "yarn start",
"dev": "npm run start",
"build": "tsup",

@@ -53,3 +53,3 @@ "test": "uvu -r solid-register",

"prettier": "^2.6.2",
"solid-register": "^0.2.3",
"solid-register": "^0.2.5",
"tslib": "^2.3.1",

@@ -69,2 +69,2 @@ "tsup": "^5.12.6",

}
}
}

@@ -16,3 +16,3 @@ <p>

- [`makeEventListener`](#makeEventListener) - Non-reactive primitive for adding event listeners that get's removed onCleanup.
- [`makeEventListener`](#makeEventListener) - Non-reactive primitive for adding event listeners that gets removed onCleanup.
- [`makeEventListenerStack`](#makeEventListenerStack) - Creates a stack of event listeners, that will be automatically disposed on cleanup.

@@ -41,2 +41,4 @@

###### Added id `@2.0.0`
Can be used to listen to DOM or Custom Events on window, document, or any EventTarget.

@@ -85,2 +87,4 @@

###### Added id `@2.0.0`
Creates a stack of event listeners, that will be automatically disposed on cleanup.

@@ -341,2 +345,6 @@

2.1.0
Allow for `undefined` targets in `createEventListener`
</details>

Sorry, the diff of this file is not supported yet

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