0
Fork 0
mirror of https://github.com/TanStack/ai.git synced 2026-11-18 19:34:58 +00:00
ai/docs/reference/functions/defineRunStore.md
github-actions[bot] 5701bf5184
docs: regenerate API documentation (#1141)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-08-18 19:53:35 +02:00

857 B

id title
defineRunStore defineRunStore

Function: defineRunStore()

function defineRunStore<T>(store): T;

Defined in: packages/ai/src/activities/chat/middleware/run-store.ts:267

Type a RunStore implementation inline: pass the object and get autocomplete plus contract checking with no separate annotation. Mirrors defineLock / defineSandboxInstanceStore.

The generic return preserves the argument's own type, so an optional method the implementation actually provides stays known-present on the result instead of collapsing back to | undefined on the interface.

Type Parameters

T

T extends RunStore

Parameters

store

T

Returns

T