Skip to content

Function: makeSyncTable

core.makeSyncTable

makeSyncTable<K, L, ParamDefsT, SchemaDefT, SchemaT>(__namedParameters): 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, SchemaDefT>
SchemaT extends ObjectSchemaDefinition<K, L, SchemaT> & { identity?: Identity }

Parameters

Name Type
__namedParameters SyncTableOptions<K, L, ParamDefsT, SchemaDefT>

Returns

SyncTableDef<K, L, ParamDefsT, SchemaT>

Defined in

api.ts:1504