We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72bd71e commit 19e80a0Copy full SHA for 19e80a0
src/jsutils/defineToJSON.js
@@ -7,9 +7,8 @@ import nodejsCustomInspectSymbol from './nodejsCustomInspectSymbol';
7
* methods, if no function provided they become aliases for toString().
8
*/
9
export default function defineToJSON(
10
- // eslint-disable-next-line flowtype/no-weak-types
11
- classObject: Class<any> | Function,
12
- fn?: () => any = classObject.prototype.toString,
+ classObject: Class<any> | ((...args: Array<any>) => mixed),
+ fn?: () => mixed = classObject.prototype.toString,
13
): void {
14
classObject.prototype.toJSON = fn;
15
classObject.prototype.inspect = fn;
0 commit comments