MCPcopy Index your code
hub / github.com/TanStack/db / waitForAngularUpdate

Function waitForAngularUpdate

packages/angular-db/tests/inject-live-query.test.ts:60–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58
59// Helper function to wait for Angular effects and collection updates
60async function waitForAngularUpdate() {
61 // Wait for Angular change detection
62 await new Promise((resolve) => setTimeout(resolve, 0))
63 // Additional delay for collection updates
64 await new Promise((resolve) => setTimeout(resolve, 50))
65}
66
67function createMockCollection<T extends object, K extends string | number>(
68 initial: Array<T & Record<`id`, K>> = [],

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected