AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
Decorators
Decorator reference for defining synced models, properties, and relations in Strata Sync.
Register metadata with the ModelRegistry at class definition time. The sync engine uses this for change tracking, serialization, delta processing, and schema hashing.
Enable decorators in tsconfig.json:
{
"compilerOptions": {
"experimentalDecorators": true
}
}Common options
Shared by several decorators. Individual sections reference this table.
| Option | Type | Default | Description |
|---|---|---|---|
lazy | boolean | false | Defers hydration until first access. |
serializer | PropertySerializer | - | Custom serializer for converting values to and from their stored representation. See Custom serializers. |
@ClientModel
Registers a synced model.