# applyUserOpOverrideOrFeeOption | @aa-sdk/core

> Overview of the applyUserOpOverrideOrFeeOption function from @aa-sdk/core

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function applyUserOpOverrideOrFeeOption<TValue>(
  value,
  override?,
  feeOption?,
): any;
```

Defined in: [aa-sdk/core/src/utils/userop.ts:145](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/utils/userop.ts#L145)

Utility method for applying a UserOperationOverrides field value and
a UserOperationFeeOptionsField value over the current value set for the field,
with the override taking precedence over the fee option

## Type Parameters

<table>
  <thead>
    <tr>
      <th align="left">Type Parameter</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `TValue` *extends* `any`
      </td>
    </tr>
  </tbody>
</table>

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `value`
      </td>

      <td>
        `TValue`
      </td>

      <td>
        the current value of the field
      </td>
    </tr>

    <tr>
      <td>
        `override?`
      </td>

      <td>
        `any`
      </td>

      <td>
        the override value to apply
      </td>
    </tr>

    <tr>
      <td>
        `feeOption?`
      </td>

      <td>
        `any`
      </td>

      <td>
        the fee option field value to apply
      </td>
    </tr>

  </tbody>
</table>

## Returns

`any`

the new value of the field after applying the override or fee option