Type Alias: ClassBuildOptions
type ClassBuildOptions = object;
Defined in: packages/client/src/core/class.ts:20
How a Class instance should be built.
Example
// Just the schema, for validating one write - no live subscription to release.
const schemaOnly = await Class.fetch(stack, 'Task', { subscribe: false });
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
subscribe? | boolean | Whether the instance watches its documents and emits doc events. Defaults to true. Set it to false for an instance that is only being read for its schema. Subscribing is not free - the handle lives until it is closed - so a caller that builds a Class per write or per read row must not subscribe, or the database accumulates live feeds and PouchDB warns about its destroyed listeners. | packages/client/src/core/class.ts:30 |