UNPKG

mysql-live-client

Version:
32 lines (31 loc) 1.22 kB
import { default as Mysql } from "./lib/MysqlLiveClient"; export default Mysql; export declare function subscribe(publicationName: string, ...args: any[]): void; export declare function unsubscribe(collectionName: string): boolean; export declare function connect(_host?: string): void; export declare type NextFn = () => void; export declare type onAcknowledgementType = (result: any) => void; export declare type onCollectionReceiveEventType = { name: string; items?: any[]; }; export declare type onObjectReceiveEventType = { name: string; item: any; }; export declare type onInsertObjectEventType = { name: string; newItem?: any; }; export declare type onUpdateObjectEventType = { name: string; newItem?: any; selector?: any; }; export declare type onRemoveObjectEventType = { name: string; selector?: any; }; export declare type onAnyChangeEventType = onCollectionReceiveEventType | onObjectReceiveEventType | onInsertObjectEventType | onUpdateObjectEventType | onRemoveObjectEventType; export declare type onChangeEvent = (evt: onAnyChangeEventType, next?: NextFn | LoopFn, loop?: (_loop: LoopFn) => void) => void; export declare type LoopFn = (item?: any) => void;