Skip to content

Commit

Permalink
Flow: Remove deprecated 'Function' type (#2008)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored Jul 2, 2019
1 parent 72bd71e commit 16db20c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/jsutils/defineToJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> | Function,
fn?: () => any = classObject.prototype.toString,
classObject: Class<any> | ((...args: Array<any>) => mixed),
fn?: () => mixed = classObject.prototype.toString,
): void {
classObject.prototype.toJSON = fn;
classObject.prototype.inspect = fn;
Expand Down

0 comments on commit 16db20c

Please sign in to comment.