Skip to content

Fix event function types #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,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 @@ -418,6 +418,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