import { Operation } from '@src/components/slate-packages/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; };