New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seng-event

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seng-event - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

lib/types.d.ts

1

index.d.ts

@@ -8,2 +8,3 @@ /**

import { default as _export } from './lib/EventDispatcher';
export * from './lib/types';
export { default as createEventClass } from './lib/createEventClass';

@@ -10,0 +11,0 @@ export { default as createIsomorphicEventClass } from './lib/createIsomorphicEventClass';

@@ -6,2 +6,10 @@ "use strict";

exports.__esModule = true;
var _exportNames = {
createEventClass: true,
createIsomorphicEventClass: true,
EventPhase: true,
EventListenerData: true,
CallListenerResult: true,
AbstractEvent: true
};
exports.default = exports.AbstractEvent = exports.CallListenerResult = exports.EventListenerData = exports.EventPhase = exports.createIsomorphicEventClass = exports.createEventClass = void 0;

@@ -11,2 +19,10 @@

var _types = require("./lib/types");
Object.keys(_types).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
exports[key] = _types[key];
});
var _createEventClass = _interopRequireDefault(require("./lib/createEventClass"));

@@ -13,0 +29,0 @@

18

lib/createEventClass.d.ts

@@ -0,19 +1,3 @@

import { EventTypeClass } from './types';
/**
* @module seng-event
*/
import BaseEvent from './BaseEvent';
/**
* @ignore
*/
declare type TypeMap<TType extends string> = {
[P in TType]: P;
};
/**
* @ignore
*/
interface EventTypeClass<TData, TType extends string> {
types: TypeMap<TType>;
new (type: TType, data: TData): BaseEvent<TData, TType>;
}
/**
* Utility function to generate a class that extends [[AbstractEvent]] and optionally has

@@ -20,0 +4,0 @@ * a `data` property.

@@ -6,9 +6,4 @@ /**

import IsomorphicBaseEvent, { EventOptions, EventOptionsMap } from './IsomorphicBaseEvent';
import { TypeMap } from './types';
/**
* @ignore
*/
declare type TypeMap<TType extends string> = {
[P in TType]: P;
};
/**
* Advanced variant of the [[createEventClass]] util. Creates an _isomorphic_ event class.

@@ -15,0 +10,0 @@ * This is an event class where the `data` property can be different for each event `type`.

{
"name": "seng-event",
"version": "2.0.0",
"version": "2.0.1",
"description": "Provides Classes and utilities for dispatching and listening to events.",

@@ -5,0 +5,0 @@ "main": "./index.js",

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