Skip to main content

defineStores()

Identity function that preserves store schema types for full TypeScript inference. Use it to define your store schemas when initializing the client.

Usage

The returned value is the same object you pass in, but TypeScript preserves the exact literal types of your schema. This enables full type inference when calling client.stores.<name>.set(), get(), etc. Pass the result to the CollabKitClient constructor:

codes

Mapping of ResponseCode enum values to their HTTP status codes, descriptions, and messages. Useful for interpreting error responses.

Usage