Fixed voidFunction

This commit is contained in:
fkereki
2018-03-31 05:17:19 -03:00
parent 6d7830ea98
commit 636b0c6db4
+1 -2
View File
@@ -1,9 +1,8 @@
/* @flow */ /* @flow */
type genericFunction = (...args: Array<mixed>) => mixed;
type voidFunction = (...args: Array<mixed>) => void; type voidFunction = (...args: Array<mixed>) => void;
const once = (fn: genericFunction): voidFunction => { const once = (fn: voidFunction): voidFunction => {
let done = false; let done = false;
return (...args) => { return (...args) => {
if (!done) { if (!done) {