Skip to content

Commit 465bf4f

Browse files
spicydonutsethul
authored andcommitted
Fix event function types (#121)
1 parent dbbf740 commit 465bf4f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/React.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,15 @@ function createFactory(class_) {
207207
exports.createFactory = createFactory;
208208

209209
function preventDefault(event) {
210-
return function() { return event.preventDefault();}
210+
return function() {
211+
event.preventDefault();
212+
};
211213
};
212214
exports.preventDefault = preventDefault;
213215

214216
function stopPropagation(event) {
215-
return function() { return event.stopPropagation();}
217+
return function() {
218+
event.stopPropagation();
219+
};
216220
};
217221
exports.stopPropagation = stopPropagation;

src/React.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,6 @@ foreign import data Children :: Type
465465
-- | Internal conversion function from children elements to an array of React elements
466466
foreign import childrenToArray :: Children -> Array ReactElement
467467

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

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

0 commit comments

Comments
 (0)