code: private void checkTypeDeprecation(NodeTraversal t, Node n) {
      if (!shouldEmitDeprecationWarning(t, n)) {
        return;
      }
  
      ObjectType instanceType = n.getJSType().toMaybeFunctionType().getInstanceType();
  
      String deprecationInfo = getTypeDeprecationInfo(instanceType);
      if (deprecationInfo == null) {
        return;
      }
  
      DiagnosticType message = deprecationInfo.isEmpty() ? DEPRECATED_CLASS : DEPRECATED_CLASS_REASON;
      compiler.report(JSError.make(n, message, instanceType.toString(), deprecationInfo));
    }
docs: Reports deprecation issue with regard to a type usage.
  
  <p>Precondition: {@code n} has a constructor {@link JSType}.