MCPcopy Index your code
hub / github.com/TanStack/ai / createDeferred

Function createDeferred

packages/ai-client/tests/generation-devtools.test.ts:111–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 }
110
111 function createDeferred<T>() {
112 let resolve!: (value: T) => void
113 const promise = new Promise<T>((nextResolve) => {
114 resolve = nextResolve
115 })
116 return { promise, resolve }
117 }
118
119 function latestSnapshotState() {
120 const snapshot = eventClientMock.emitted('hook:state-snapshot').at(-1)?.[1]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected