Skip to content

Commit 16db20c

Browse files
Flow: Remove deprecated 'Function' type (#2008)
1 parent 72bd71e commit 16db20c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/jsutils/defineToJSON.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ import nodejsCustomInspectSymbol from './nodejsCustomInspectSymbol';
77
* methods, if no function provided they become aliases for toString().
88
*/
99
export default function defineToJSON(
10-
// eslint-disable-next-line flowtype/no-weak-types
11-
classObject: Class<any> | Function,
12-
fn?: () => any = classObject.prototype.toString,
10+
classObject: Class<any> | ((...args: Array<any>) => mixed),
11+
fn?: () => mixed = classObject.prototype.toString,
1312
): void {
1413
classObject.prototype.toJSON = fn;
1514
classObject.prototype.inspect = fn;

0 commit comments

Comments
 (0)