Skip to content

@eightkk/vue-weave / core / TransactionAdapter

Interface: TransactionAdapter<S, P> ​

Defined in: src/core/editTransaction.ts:31

Application hooks. validate and apply are synchronous and must not mutate their arguments.

Type Parameters ​

S ​

S

P ​

P

Methods ​

apply() ​

apply(state, changes): S

Defined in: src/core/editTransaction.ts:34

Parameters ​

state ​

S

changes ​

readonly P[]

Returns ​

S


save() ​

save(request, candidate): Promise<SaveResult<S>>

Defined in: src/core/editTransaction.ts:35

Parameters ​

request ​

EditTransaction<P, S>

candidate ​

S

Returns ​

Promise<SaveResult<S>>


validate() ​

validate(state, changes): string | boolean | void

Defined in: src/core/editTransaction.ts:33

Return false or a reason string to reject the changes; true or nothing accepts them.

Parameters ​

state ​

S

changes ​

readonly P[]

Returns ​

string | boolean | void

Released under the MIT License.