Skip to content

Commit

Permalink
Flow: Remove deprecated 'Function' type
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jul 2, 2019
1 parent 72bd71e commit fa87db5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/jsutils/defineToJSON.js
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 fa87db5

Please sign in to comment.