code: private void collapseDeclarationOfNameAndDescendants(Name n, String alias) {
      boolean canCollapseChildNames = n.canCollapseUnannotatedChildNames();
  
      // Handle this name first so that nested object literals get unrolled.
      if (canCollapse(n)) {
        updateGlobalNameDeclaration(n, alias, canCollapseChildNames);
      }
  
      if (n.props == null) {
        return;
      }
      for (Name p : n.props) {
        collapseDeclarationOfNameAndDescendants(p, appendPropForAlias(alias, p.getBaseName()));
      }
    }
docs: Collapses definitions of the collapsible properties of a global name.
  Recurs on subnames that also represent JavaScript objects with
  collapsible properties.
  
  @param n A node representing a global name
  @param alias The flattened name for {@code n}