Skip to content

Function: makeSyncTable

core.makeSyncTable

makeSyncTable<K, L, ParamDefsT, SchemaDefT, SchemaT>(«destructured»): SyncTableDef<K, L, ParamDefsT, SchemaT>

Wrapper to produce a sync table definition. All (non-dynamic) sync tables should be created using this wrapper rather than declaring a sync table definition object directly.

This wrapper does a variety of helpful things, including * Doing basic validation of the provided definition. * Normalizing the schema definition to conform to Coda-recommended syntax. * Wrapping the execute formula to normalize return values to match the normalized schema.

See Normalization for more information about schema normalization.

Type parameters

Name Type
K extends string
L extends string
ParamDefsT extends ParamDefs
SchemaDefT extends ObjectSchemaDefinition<K, L>
SchemaT extends ObjectSchemaDefinition<K, L> & { identity?: Identity }

Parameters

Name Type
«destructured» SyncTableOptions<K, L, ParamDefsT, SchemaDefT>

Returns

SyncTableDef<K, L, ParamDefsT, SchemaT>

Defined in

api.ts:2278