UNPKG

@skokenes/slate-yjs

Version:
9 lines (8 loc) 336 B
import { Operation } from 'slate'; import { SharedType } from '../model'; export declare type ApplyFunc<O extends Operation = Operation> = (sharedType: SharedType, op: O) => SharedType; export declare type OpMapper<O extends Operation = Operation> = { [K in O['type']]: O extends { type: K; } ? ApplyFunc<O> : never; };