Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
David Cetinkaya committed Apr 5, 2019
1 parent 59d6abc commit 8aaf00c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/components/eventDispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ type Callback = () => void
type Event = 'init' | 'select' | 'dragStart' | 'dragEnd' | 'destroy'

interface Subscribers {
destroy: Callback[]
dragEnd: Callback[]
dragStart: Callback[]
init: Callback[]
select: Callback[]
dragStart: Callback[]
dragEnd: Callback[]
destroy: Callback[]
}

export interface EventDispatcher {
Expand All @@ -18,11 +18,11 @@ export interface EventDispatcher {
export function EventDispatcher(): EventDispatcher {
const self = {} as EventDispatcher
const subscribers: Subscribers = {
destroy: [],
dragEnd: [],
dragStart: [],
init: [],
select: [],
dragStart: [],
dragEnd: [],
destroy: [],
}

function dispatch(type: Event): EventDispatcher {
Expand All @@ -45,7 +45,7 @@ export function EventDispatcher(): EventDispatcher {

return Object.assign(self, {
dispatch,
on,
off,
on,
})
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ export function EmblaCarousel(
destroy,
goTo,
next,
previous,
on: eventDispatcher.on,
off: eventDispatcher.off,
on: eventDispatcher.on,
previous,
selectedIndex,
})
}
Expand Down

0 comments on commit 8aaf00c

Please sign in to comment.