Tx ​Contract 2.0.0 · package sha256
a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e· generated fromconfigurator-runtime.d.tsbyservices/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.
Interface · import type { Tx } from '@holostep-configurators/runtime-client/contract'; · stable · since 2.0.0 · section 5. Writers, transactions, session
A transaction's scoped writer. Valid only while the transaction is open (the IndexedDB
TransactionInactiveError rule): after commit or rollback, writes through it or its handles throw
HoloTransactionClosedError; reads keep working. It takes no commit options (NoCommitOptions).
It has no undo, redo, idle, on, beforeCommit, history or destroy. session.revision read in
work is the revision it opened at: nothing outside it commits while it is open (spec section
6.1, O2b).
| Member | Kind | Summary |
|---|---|---|
op |
property | The transaction's operation id, as in its Report and cause.op. |
open |
property | False once committed, rolled back or superseded. |
signal |
property | Aborts on every close that is not a commit. |
transaction |
method | A savepoint. |
Inherited from Writer: node, find, collection, apply, applyPatch, setSceneModel, select, stage, materials, assembly, camera, animations, labs, state, getSceneModel.
export interface Tx extends Writer<NoCommitOptions> {
readonly op: OpId;
readonly open: boolean;
readonly signal: AbortSignal;
transaction<T>(work: (sp: Tx) => T | Promise<T>, options?: SignalOption): Promise<TransactionReport<T>>;
}
| Rule | Result |
|---|---|
| 1. Neutral name | pass: Tx names no product |
| 2. A precedent | pass: Unity AnimationClip.SampleAnimation (row G36) |
| 3. Two apps, or labs | pass: 18 apps (ledger: app-f9a32142f1; fleet cross-check: app-04c2774145, app-37356bf09f, app-4762caacdc, app-4fd23bc869, app-510d750508, app-822bb9d6aa, app-8675b3225c, app-bcb7ef21da and 9 more) |
| 4. The cheaper fix first | decided per need in Appendix B: rows G36 at tier stable (a member only where no rule, data, asset or app code serves the need) |