Fixed voidFunction
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
/* @flow */
|
||||
|
||||
type genericFunction = (...args: Array<mixed>) => mixed;
|
||||
type voidFunction = (...args: Array<mixed>) => void;
|
||||
|
||||
const once = (fn: genericFunction): voidFunction => {
|
||||
const once = (fn: voidFunction): voidFunction => {
|
||||
let done = false;
|
||||
return (...args) => {
|
||||
if (!done) {
|
||||
|
||||
Reference in New Issue
Block a user