* Creates a new CollectionState manager
(config: CollectionConfig<TOutput, TKey, TSchema>)
| 129 | * Creates a new CollectionState manager |
| 130 | */ |
| 131 | constructor(config: CollectionConfig<TOutput, TKey, TSchema>) { |
| 132 | this.config = config |
| 133 | this.transactions = new SortedMap<string, Transaction<any>>((a, b) => |
| 134 | a.compareCreatedAt(b), |
| 135 | ) |
| 136 | |
| 137 | // Set up data storage - always use SortedMap for deterministic iteration. |
| 138 | // If a custom compare function is provided, use it; otherwise entries are sorted by key only. |
| 139 | this.syncedData = new SortedMap<TKey, TOutput>(config.compare) |
| 140 | } |
| 141 | |
| 142 | setDeps(deps: { |
| 143 | collection: CollectionImpl<TOutput, TKey, any, TSchema, TInput> |
nothing calls this directly
no test coverage detected