code: FunctionTypeBuilder inferKind(@Nullable JSDocInfo info) {
      if (info != null) {
        if (!NodeUtil.isMethodDeclaration(errorRoot)) {
          isConstructor = info.isConstructor();
          isInterface = info.isInterface();
          isRecord = info.usesImplicitMatch();
          makesStructs = info.makesStructs();
          makesDicts = info.makesDicts();
        }
        isAbstract = info.isAbstract();
      }
      if (isClass) {
        // If a CLASS literal has not been explicitly declared an interface, it's a constructor.
        // If it's not expicitly @dict or @unrestricted then it's @struct.
        isConstructor = !isInterface;
        makesStructs = info == null || (!makesDicts && !info.makesUnrestricted());
      }
  
      if (makesStructs && !(isConstructor || isInterface)) {
        reportWarning(CONSTRUCTOR_REQUIRED, "@struct", formatFnName());
      } else if (makesDicts && !isConstructor) {
        reportWarning(CONSTRUCTOR_REQUIRED, "@dict", formatFnName());
      }
      return this;
    }
docs: Infer whether the function is a normal function, a constructor, or an interface.