Skip to content

Commit

Permalink
fixing IEventLike type
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Mar 13, 2020
1 parent f21d31e commit 0077c8d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extras/src/from-emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function fromEmitter<T = unknown>(target: IEmitterLike, event: string | s
/**
* Creates a named event from emitter, for multi-argument, tuple-type events.
*
* The emitted arguments are passed into the handler as an array or as a tuple.
* The emitted arguments are passed into the handler as a tuple array.
*/
export function fromEmitterArgs<T extends unknown[]>(target: IEmitterLike, event: string | symbol, options?: IEmitOptions): SubEventCount<T> {
const sec: SubEventCount<T> = new SubEventCount();
Expand Down
4 changes: 2 additions & 2 deletions extras/src/from-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {SubEventCount, IEmitOptions} from '../../src';
* Helps supporting any custom Event-like type.
*/
interface IEventLike {
addEventListener: (type: string, callback: (e: Event) => void) => this;
removeEventListener: (type: string, callback: (e: Event) => void) => this;
addEventListener: (type: string, callback: (e: Event) => void) => void;
removeEventListener: (type: string, callback: (e: Event) => void) => void;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sub-events",
"version": "1.8.3",
"version": "1.8.4",
"description": "Lightweight, strongly-typed events, with monitored subscriptions.",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down

0 comments on commit 0077c8d

Please sign in to comment.