code: @CheckReturnValue
    @SuppressWarnings("ReferenceEquality") // unknownType is a singleton
    private FlowScope updateNamedParameter(
        Node paramName, boolean hasDefaultValue, JSType inferredType, FlowScope entryFlowScope) {
      TypedVar var = containerScope.getVar(paramName.getString());
      checkNotNull(var, "Missing var for parameter %s", paramName);
  
      paramName.setJSType(inferredType);
  
      if (var.isTypeInferred()) {
        var.setType(inferredType);
      } else if (hasDefaultValue) {
        // If this is a declared type with a default value, update the LinkedFlowScope slots but not
        // the actual TypedVar. This is similar to what would happen if the default value was moved
        // into an assignment in the fn body
        entryFlowScope = redeclareSimpleVar(entryFlowScope, paramName, inferredType);
      }
      return entryFlowScope;
    }
docs: Sets the types of a named/non-destructuring function parameter to an inferred type.
  
  <p>This method is responsible for typing:
  
  <ul>
  <li>The scope slot
  <li>The param node
  </ul>