> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Interface: OperationEditor<Input, Output>

> What a form library supplies to bind to an operation.

[browser](https://docs.bijection.com/api/modules/browser).OperationEditor

What a form library supplies to bind to an operation. `Output` is what
the library's validation produces from `Input`.

## Type parameters

| Name | Type |
| :- | :- |
| `Input` | extends [`Value`](https://docs.bijection.com/api/modules/values#value) |
| `Output` | `Output` |

## Hierarchy

* [`EditorStatePort`](https://docs.bijection.com/api/interfaces/browser.EditorStatePort)\<`Input`>

  ↳ **`OperationEditor`**

## Methods

### read

▸ **read**(): `Input`

The current input. Bijection reads it directly before an attempt and
before capture, so a delayed change notification cannot be missed.

#### Returns

`Input`

#### Inherited from

[EditorStatePort](https://docs.bijection.com/api/interfaces/browser.EditorStatePort.md).[read](https://docs.bijection.com/api/interfaces/browser.EditorStatePort.md#read)

***

### subscribe

▸ **subscribe**(`listener`): () => `void`

Notify after edits, including programmatic ones.

#### Parameters

| Name | Type |
| :- | :- |
| `listener` | () => `void` |

#### Returns

`fn`

▸ (): `void`

##### Returns

`void`

#### Inherited from

[EditorStatePort](https://docs.bijection.com/api/interfaces/browser.EditorStatePort.md).[subscribe](https://docs.bijection.com/api/interfaces/browser.EditorStatePort.md#subscribe)

***

### load

▸ **load**(`state`): `void`

Establish both the baseline and the current input, and clear the
previous interaction's errors, touched state and submission history.
Called for every recovered draft, reset and new draft, even when the
values are equal. Notifications it causes synchronously are ignored.

#### Parameters

| Name | Type |
| :- | :- |
| `state` | `Readonly`\<\{ `baseline`: `Input` ; `input`: `Input`  }> |

#### Returns

`void`

#### Inherited from

[EditorStatePort](https://docs.bijection.com/api/interfaces/browser.EditorStatePort.md).[load](https://docs.bijection.com/api/interfaces/browser.EditorStatePort.md#load)

***

### attempt

▸ **attempt**\<`Result`>(`continueWith`, `options`): `Promise`\<[`EditorAttempt`](https://docs.bijection.com/api/modules/browser#editorattempt)\<`Result`>>

Run the library's own submission pipeline: its submission state, its
validation, its focus and its later revalidation behaviour. Call
`continueWith` only after the library accepts the input, and await it
within the library's submission. The signal aborts when Bijection no
longer wants the handoff; a library that cannot stop its validator may
ignore it, since a handoff after abort captures nothing.

#### Type parameters

| Name |
| :- |
| `Result` |

#### Parameters

| Name | Type |
| :- | :- |
| `continueWith` | (`output`: `Output`) => `Promise`\<`Result`> |
| `options` | `Object` |
| `options.signal` | `AbortSignal` |

#### Returns

`Promise`\<[`EditorAttempt`](https://docs.bijection.com/api/modules/browser#editorattempt)\<`Result`>>

***

### replaceServerIssues

▸ **replaceServerIssues**(`issues`): `void`

Replace Bijection's previous contribution of feedback with these issues.
Never clear feedback the library has installed since, and keep every
issue for a field visible.

#### Parameters

| Name | Type |
| :- | :- |
| `issues` | readonly [`EditorIssue`](https://docs.bijection.com/api/modules/browser#editorissue)\[] |

#### Returns

`void`

***

### setEditable

▸ `Optional` **setEditable**(`editable`): `void`

Follow Bijection's editing restrictions: no editing while restoring or
once input is captured into a request.

#### Parameters

| Name | Type |
| :- | :- |
| `editable` | `boolean` |

#### Returns

`void`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.