code: static DestructuredTarget createTarget(
        JSTypeRegistry registry, Supplier<JSType> destructuringPatternType, Node destructuringChild) {
      checkArgument(destructuringChild.getParent().isDestructuringPattern(), destructuringChild);
  
      Builder builder =
          new Builder(registry, destructuringChild.getParent(), destructuringPatternType);
      switch (destructuringChild.getToken()) {
        case STRING_KEY:
          // const {objectLiteralKey: x} = ...
          builder.setObjectPatternKey(destructuringChild);
          Node value = destructuringChild.getFirstChild();
          if (value.isDefaultValue()) {
            builder.setNode(value.getFirstChild());
            builder.setDefaultValue(value.getSecondChild());
          } else {
            builder.setNode(value);
          }
          break;
  
        case COMPUTED_PROP:
          // const {['objectLiteralKey']: x} = ...
          builder.setObjectPatternKey(destructuringChild);
          value = destructuringChild.getSecondChild();
          if (value.isDefaultValue()) {
            builder.setNode(value.getFirstChild());
            builder.setDefaultValue(value.getSecondChild());
          } else {
            builder.setNode(value);
          }
          break;
  
        case OBJECT_PATTERN: // const [{x}] = ...
        case ARRAY_PATTERN: // const [[x]] = ...
        case NAME: // const [x] = ...
        case GETELEM: // [obj[3]] = ...
        case GETPROP: // [this.x] = ...
          builder.setNode(destructuringChild);
          break;
  
        case DEFAULT_VALUE: // const [x = 3] = ...
          builder.setNode(destructuringChild.getFirstChild());
          builder.setDefaultValue(destructuringChild.getSecondChild());
          break;
  
        case REST:
          // const [...x] = ...
          // const {...x} = ...
          builder.setNode(destructuringChild.getFirstChild());
          builder.setIsRest(true);
          break;
  
        default:
          throw new IllegalArgumentException(
              "Unexpected child of destructuring pattern " + destructuringChild);
      }
      return builder.build();
    }
docs: Converts a given child of a destructuring pattern (in the AST) to an instance of this class.
  
  NOTE: does not accept EMPTY nodes