Collection ​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 { Collection } from '@holostep-configurators/runtime-client/contract'; · stable · since 2.0.0 · section 7. Collections and shapes
Content you create. Disposing removes everything it created, its rules, its stage settings and
the hooks on its parts, and aborts its signal: pass that to onFrame, on or
materials.create to end them with it. C: the commit options of the writer it is bound to.
A bare Collection is Collection<NoCommitOptions> (member options only), which fits a handle
from either writer; store a session handle that takes origin as Collection<CommitOptions>.
| Member | Kind | Summary |
|---|---|---|
name |
property | The name it was created with; unique among live collections. |
role |
property | Fixed at creation. |
signal |
property | Aborts when the collection is disposed. |
disposed |
property | True once disposed: writes then do nothing, record 'handle-disposed' and resolve 'refused' with reason 'disposed'; load() starts nothing and rejects AbortError (spec section 3.4). |
root |
property | The collection's root part. |
set |
method | Keyed reconcile to the whole spec (not a merge patch): items are added, changed in place or removed by key, including items that load() added. |
load |
method | Loads a glTF/GLB as one item. |
part |
method | The part for an item key; exists: false when there is none. |
dispose |
method | Terminal and immediate. |
export interface Collection<C extends object = NoCommitOptions> {
readonly name: string;
readonly role: Role;
readonly signal: AbortSignal;
readonly disposed: boolean;
readonly root: Part<C>;
set(spec: CollectionSpec, options?: C & SignalOption): Promise<CollectionReport>;
load(url: string, placement?: Placement & {
key?: string;
signal?: AbortSignal;
}): Promise<Part<C>>;
part(key: string): Part<C>;
dispose(): void;
}
| Rule | Result |
|---|---|
| 1. Neutral name | pass: Collection names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |