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

Function createDeferred

packages/ai-react/tests/use-chat.test.ts:17–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16describe('useChat', () => {
17 function createDeferred<T>() {
18 let resolve!: (value: T) => void
19 const promise = new Promise<T>((promiseResolve) => {
20 resolve = promiseResolve
21 })
22 return { promise, resolve }
23 }
24
25 describe('initialization', () => {
26 it('should initialize with default state', () => {

Callers 1

use-chat.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected