Function
waitForCollectionReady
(
collection: Collection<T>,
timeout = 5000,
)
Source from the content-addressed store, hash-verified
| 105 | * Wait for collection to finish loading (status === 'ready') |
| 106 | */ |
| 107 | export async function waitForCollectionReady<T extends object>( |
| 108 | collection: Collection<T>, |
| 109 | timeout = 5000, |
| 110 | ): Promise<void> { |
| 111 | await waitFor(() => collection.status === `ready`, { |
| 112 | timeout, |
| 113 | message: `Collection did not reach 'ready' status (current: ${collection.status})`, |
| 114 | }) |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * Wait for a query to have data after preload. |
Callers
nothing calls this directly
Tested by
no test coverage detected