code: function isMethod(path) {
    const isProbablyMethod =
      (t.MethodDefinition.check(path.node) && path.node.kind !== 'constructor') ||
      ((t.ClassProperty.check(path.node) || t.Property.check(path.node)) &&
        t.Function.check(path.get('value').node));
  
    return isProbablyMethod && !isReactComponentMethod(path);
  }
docs: The following values/constructs are considered methods:
  
  - Method declarations in classes (except "constructor" and React lifecycle
  methods
  - Public class fields in classes whose value are a functions
  - Object properties whose values are functions