diff --git a/src/jsutils/defineToJSON.js b/src/jsutils/defineToJSON.js index 2d64c912c44..58991da01b9 100644 --- a/src/jsutils/defineToJSON.js +++ b/src/jsutils/defineToJSON.js @@ -7,9 +7,8 @@ import nodejsCustomInspectSymbol from './nodejsCustomInspectSymbol'; * methods, if no function provided they become aliases for toString(). */ export default function defineToJSON( - // eslint-disable-next-line flowtype/no-weak-types - classObject: Class | Function, - fn?: () => any = classObject.prototype.toString, + classObject: Class | (...args: Array) => mixed, + fn?: () => mixed = classObject.prototype.toString, ): void { classObject.prototype.toJSON = fn; classObject.prototype.inspect = fn;