seng-event
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -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'; |
16
index.js
@@ -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 @@ |
@@ -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
338882
36
1622