/** @module @airtable/blocks/models: Abstract models */ /** */ import { FlowAnyObject } from './private_utils'; /** * Abstract superclass for watchable models. All watchable models expose `watch` * and `unwatch` methods that allow consumers to subscribe to changes to that model. * * This class should not be used directly. * * @docsPath models/advanced/Watchable */ declare class Watchable { /** * Get notified of changes to the model. * * Every call to `.watch` should have a matching call to `.unwatch`. * * Returns the array of keys that were watched. * * @param keys the keys to watch * @param callback a function to call when those keys change * @param context an optional context for `this` in `callback`. */ watch(keys: WatchableKey | ReadonlyArray, callback: (model: this, key: WatchableKey, ...args: Array) => unknown, context?: FlowAnyObject | null): Array; /** * Unwatch keys watched with `.watch`. * * Should be called with the same arguments given to `.watch`. * * Returns the array of keys that were unwatched. * * @param keys the keys to unwatch * @param callback the function passed to `.watch` for these keys * @param context the context that was passed to `.watch` for this `callback` */ unwatch(keys: WatchableKey | ReadonlyArray, callback: (model: this, key: WatchableKey, ...args: Array) => unknown, context?: FlowAnyObject | null): Array; } export default Watchable; //# sourceMappingURL=watchable.d.ts.map