code: private boolean shouldEmitDeprecationWarning(NodeTraversal t, PropertyReference propRef) {
      // In the global scope, there are only two kinds of accesses that should
      // be flagged for warnings:
      // 1) Calls of deprecated functions and methods.
      // 2) Instantiations of deprecated classes.
      // For now, we just let everything else by.
      if (t.inGlobalScope()) {
        if (!NodeUtil.isInvocationTarget(propRef.getSourceNode())) {
          return false;
        }
      }
  
      // We can always assign to a deprecated property, to keep it up to date.
      if (propRef.isMutation()) {
        return false;
      }
  
      // Don't warn if the node is just declaring the property, not reading it.
      JSDocInfo jsdoc = propRef.getJSDocInfo();
      if (propRef.isDeclaration() && (jsdoc != null) && jsdoc.isDeprecated()) {
        return false;
      }
  
      return !canAccessDeprecatedTypes(t);
    }
docs: Determines whether a deprecation warning should be emitted.