* Check if a key exists in the collection (virtual derived state)
(key: TKey)
| 368 | * Check if a key exists in the collection (virtual derived state) |
| 369 | */ |
| 370 | public has(key: TKey): boolean { |
| 371 | const { optimisticDeletes, optimisticUpserts, syncedData } = this |
| 372 | // Check if optimistically deleted |
| 373 | if (optimisticDeletes.has(key)) { |
| 374 | return false |
| 375 | } |
| 376 | |
| 377 | // Check optimistic upserts first |
| 378 | if (optimisticUpserts.has(key)) { |
| 379 | return true |
| 380 | } |
| 381 | |
| 382 | // Fall back to synced data |
| 383 | return syncedData.has(key) |
| 384 | } |
| 385 | |
| 386 | /** |
| 387 | * Get all keys (virtual derived state) |
no outgoing calls
no test coverage detected