Skip to content

Function: makeSyncTable()

makeSyncTable<K, L, ParamDefsT, SchemaDefT, SchemaT, ContextT, PermissionsContextT>(__namedParameters): SyncTableDef<K, L, ParamDefsT, SchemaT, ContextT, PermissionsContextT>

Defined in: api.ts:2525

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

Type Parameter
K extends string
L extends string
ParamDefsT extends ParamDefs
SchemaDefT extends ObjectSchemaDefinition<K, L>
SchemaT extends ObjectSchemaDefinition<K, L> & object
ContextT extends SyncExecutionContext<any, any, any>
PermissionsContextT extends SyncPassthroughData

Parameters

Parameter Type
__namedParameters SyncTableOptions<K, L, ParamDefsT, SchemaDefT, ContextT, PermissionsContextT>

Returns

SyncTableDef<K, L, ParamDefsT, SchemaT, ContextT, PermissionsContextT>