UNPKG

@orbit/coordinator

Version:

A coordinator and set of coordination strategies for managing data flow and keeping @orbit/data sources in sync.

34 lines (33 loc) 1.11 kB
import { StrategyOptions } from '../strategy'; import { ConnectionStrategy } from './connection-strategy'; export interface SyncStrategyOptions extends StrategyOptions { /** * The name of the source to be observed. */ source: string; /** * The name of the source which will be acted upon. */ target: string; /** * A handler for any errors thrown as a result of the sync operation. */ catch?: (error: Error, ...args: any[]) => void; /** * A filter function that returns `true` if the sync should be performed. * * `filter` will be invoked in the context of this strategy (and thus will * have access to both `this.source` and `this.target`). */ filter?: (...args: any[]) => boolean; /** * Should resolution of the target's `sync` block the completion of the * source's `transform`? * * By default, `blocking` is false. */ blocking?: boolean | ((...args: any[]) => boolean); } export declare class SyncStrategy extends ConnectionStrategy { constructor(options: SyncStrategyOptions); }