code: function inferAnnotationFromBinaryExpression(name, path) {
    var operator = path.node.operator;
  
    var right = path.get("right").resolve();
    var left = path.get("left").resolve();
  
    var target;
    if (left.isIdentifier({ name: name })) {
      target = right;
    } else if (right.isIdentifier({ name: name })) {
      target = left;
    }
    if (target) {
      if (operator === "===") {
        return target.getTypeAnnotation();
      } else if (t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
        return t.numberTypeAnnotation();
      } else {
        return;
      }
    } else {
      if (operator !== "===") return;
    }
  
    //
    var typeofPath;
    var typePath;
    if (left.isUnaryExpression({ operator: "typeof" })) {
      typeofPath = left;
      typePath = right;
    } else if (right.isUnaryExpression({ operator: "typeof" })) {
      typeofPath = right;
      typePath = left;
    }
    if (!typePath && !typeofPath) return;
  
    // ensure that the type path is a Literal
    typePath = typePath.resolve();
    if (!typePath.isLiteral()) return;
  
    // and that it's a string so we can infer it
    var typeValue = typePath.node.value;
    if (typeof typeValue !== "string") return;
  
    // and that the argument of the typeof path references us!
    if (!typeofPath.get("argument").isIdentifier({ name: name })) return;
  
    // turn type value into a type annotation
    return t.createTypeAnnotationBasedOnTypeof(typePath.node.value);
  }
docs: [Please add a description.]