code: private void handleStubDefinition(NodeTraversal t, Node n) {
      if (!t.inGlobalHoistScope()) {
        return;
      }
      JSDocInfo info = n.getFirstChild().getJSDocInfo();
      boolean hasStubDefinition = info != null && (n.isFromExterns() || info.hasTypedefType());
      if (hasStubDefinition) {
        if (n.getFirstChild().isQualifiedName()) {
          String name = n.getFirstChild().getQualifiedName();
          ProvidedName pn = providedNames.get(name);
          if (pn != null) {
            n.putBooleanProp(Node.WAS_PREVIOUSLY_PROVIDED, true);
            pn.addDefinition(n, t.getModule());
          } else if (n.getBooleanProp(Node.WAS_PREVIOUSLY_PROVIDED)) {
            // We didn't find it in the providedNames, but it was previously marked as provided.
            // This implies we're in hotswap pass and the current typedef is a provided namespace.
            ProvidedName provided = new ProvidedName(name, n, t.getModule(), true, true);
            providedNames.put(name, provided);
            provided.addDefinition(n, t.getModule());
          }
        }
      }
    }
docs: Handles a stub definition for a goog.provided name (e.g. a @typedef or a definition from
  externs)
  
  @param n EXPR_RESULT node.