Skip to content

Commit

Permalink
Fix event function types (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
spicydonuts authored and ethul committed Nov 2, 2017
1 parent dbbf740 commit 465bf4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,15 @@ function createFactory(class_) {
exports.createFactory = createFactory;

function preventDefault(event) {
return function() { return event.preventDefault();}
return function() {
event.preventDefault();
};
};
exports.preventDefault = preventDefault;

function stopPropagation(event) {
return function() { return event.stopPropagation();}
return function() {
event.stopPropagation();
};
};
exports.stopPropagation = stopPropagation;
4 changes: 2 additions & 2 deletions src/React.purs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,6 @@ foreign import data Children :: Type
-- | Internal conversion function from children elements to an array of React elements
foreign import childrenToArray :: Children -> Array ReactElement

foreign import preventDefault :: forall eff a. Event -> Eff eff a
foreign import preventDefault :: forall eff. Event -> Eff eff Unit

foreign import stopPropagation :: forall eff a. Event -> Eff eff a
foreign import stopPropagation :: forall eff. Event -> Eff eff Unit

0 comments on commit 465bf4f

Please sign in to comment.