code: private ImmutableList<Require> getAllRequiresInDeclaration() {
      Node rhs =
          nameDeclaration.getFirstChild().isDestructuringLhs()
              ? nameDeclaration.getFirstChild().getSecondChild()
              : nameDeclaration.getFirstFirstChild();
  
      String namespace = rhs.getSecondChild().getString();
  
      if (nameDeclaration.getFirstChild().isName()) {
        // const modA = goog.require('modA');
        Node lhs = nameDeclaration.getFirstChild();
        return ImmutableList.of(
            Require.create(
                lhs.getString(),
                Import.builder()
                    .moduleRequest(namespace)
                    .localName(lhs.getString())
                    .importName(Export.NAMESPACE)
                    .importNode(nameDeclaration)
                    .nameNode(lhs)
                    .build(),
                requireKind));
      } else {
        // const {x, y} = goog.require('modA');
        Node objectPattern = nameDeclaration.getFirstFirstChild();
        if (!objectPattern.isObjectPattern()) {
          // bad JS, ignore
          return ImmutableList.of();
        }
        return getAllRequiresFromDestructuring(objectPattern, namespace);
      }
    }
docs: Returns a new list of all required names in {@link #nameDeclaration}