import { Operation } from 'slate'; import { SharedType } from '../model'; export type ApplyFunc = ( sharedType: SharedType, op: O ) => SharedType; export type OpMapper = { [K in O['type']]: O extends { type: K } ? ApplyFunc : never; };