code: @CheckReturnValue
    @SuppressWarnings("ReferenceEquality") // unknownType is a singleton
    private FlowScope updateDestructuringParameter(
        Node pattern, JSType inferredType, FlowScope entryFlowScope) {
      // look through all expressions and lvalues in the pattern.
      // given an lvalue, change its type if either a) it's inferred (not declared in
      // TypedScopeCreator) or b) it has a default value
      entryFlowScope =
          traverseDestructuringPatternHelper(
              pattern,
              entryFlowScope,
              inferredType,
              (FlowScope scope, Node lvalue, JSType type) -> {
                TypedVar var = containerScope.getVar(lvalue.getString());
                checkNotNull(var);
                // This condition will trigger on cases like
                //   (function f({x}) {})({x: 3})
                // where `x` is of unknown type during the typed scope creation phase, but
                // here we can infer that it is of type `number`
                if (var.isTypeInferred()) {
                  var.setType(type);
                  lvalue.setJSType(type);
                }
                if (lvalue.getParent().isDefaultValue()) {
                  // Given
                  //   /** @param {{age: (number|undefined)}} data */
                  //   function f({age = 99}) {}
                  // infer that `age` is now a `number` and not `number|undefined`
                  // treat this similarly to if there was an assignment inside the function body
                  // TODO(b/117162687): allow people to narrow the declared type to
                  // exclude 'undefined' inside the function body.
                  scope = updateScopeForAssignment(scope, lvalue, type, AssignmentType.ASSIGN);
                }
                return scope;
              });
  
      return entryFlowScope;
    }
docs: Sets the types of a un-named/destructuring function parameter to an inferred type.
  
  <p>This method is responsible for typing:
  
  <ul>
  <li>The scope slot
  <li>The pattern nodes
  </ul>