code: private void checkEs6ConstructorInvocationVisibility(Node target) {
      FunctionType ctorType = target.getJSType().toMaybeFunctionType();
      ObjectType prototypeType = ctorType.getPrototype();
  
      // We use the class definition site because classes automatically get a implicit constructor,
      // so there may not be a definition node.
      @Nullable Node classDefinition = ctorType.getSource();
  
      @Nullable
      StaticSourceFile definingSource =
          (classDefinition == null)
              ? null
              : AccessControlUtils.getDefiningSource(classDefinition, prototypeType, "constructor");
  
      // Synthesize a `PropertyReference` for this constructor call as if we're accessing
      // `Foo.prototype.constructor`. This object allows us to reuse the
      // `checkPropertyAccessVisibility` method which actually reports violations.
      PropertyReference fauxCtorRef =
          PropertyReference.builder()
              .setSourceNode(target)
              .setName("constructor")
              .setReceiverType(prototypeType)
              .setMutation(false) // This shouldn't matter.
              .setDeclaration(false) // This shouldn't matter.
              .setOverride(false) // This shouldn't matter.
              .setReadableTypeName(() -> ctorType.getInstanceType().toString())
              .build();
  
      Visibility annotatedCtorVisibility =
          // This function defaults to `INHERITED` which isn't what we want here, but it does handle
          // combining inline and `@fileoverview` visibilities.
          getEffectiveVisibilityForNonOverriddenProperty(
              fauxCtorRef,
              prototypeType,
              defaultVisibilityForFiles.get(definingSource),
              enforceCodingConventions ? compiler.getCodingConvention() : null);
      Visibility effectiveCtorVisibility =
          annotatedCtorVisibility.equals(Visibility.INHERITED)
              ? Visibility.PUBLIC
              : annotatedCtorVisibility;
  
      checkPropertyAccessVisibility(
          fauxCtorRef,
          effectiveCtorVisibility,
          ctorType,
          target.getStaticSourceFile(),
          definingSource);
    }
docs: Reports visibility violations on ES6 class constructor invocations.
  
  <p>Precondition: {@code target} has an ES6 class {@link JSType}.