Skip to content

Commit

Permalink
fix: emit allows optional data parameter for 'end' event
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbubu committed Apr 25, 2020
1 parent 3632a04 commit 3661c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import looper from './looper'
export type Event = 'data' | 'end' | 'error'
export type QueueElem<Out> = Out | null
export interface Emitter<In, Out> {
emit: (event: Event, data: In | pull.EndOrError) => void
emit: (event: Event, data?: In | pull.EndOrError) => void
queue: (data: QueueElem<Out>) => void
}
export type Writer<In, Out> = (this: Emitter<In, Out>, data: In) => void
Expand Down

0 comments on commit 3661c9e

Please sign in to comment.