UNPKG

collaborative-editor

Version:

JSON CRDT str node bindings to any generic plain text editor.

13 lines (12 loc) 555 B
import type { CollaborativeStr } from '../types'; import type { ReplicatedStrFacade } from './types'; export declare class ReplicatedStr implements CollaborativeStr { protected readonly facade: ReplicatedStrFacade; readonly view: () => string; readonly ins: (pos: number, text: string) => void; readonly del: (pos: number, length: number) => void; readonly findId: CollaborativeStr['findId']; readonly findPos: CollaborativeStr['findPos']; readonly api: CollaborativeStr['api']; constructor(facade: ReplicatedStrFacade); }