Skip to content

createStore

createStore<L>(build): never

Defined in: state/factories.ts:709

Define a compound store: many typed leaves bundled into one serialize/restore unit. The builder receives s and returns a record of leaves; the result spreads those leaves at the top level so game.gold.increment() works.

L extends StoreLeaves

(s) => L

never

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.