import { useReducer, useCallback } from 'react';
const initialState = (present) => ({ past: [], present, future: [] });
function historyReducer(state, action) {
const { past, present, future } = state;
export interface DocState {
text: string;
selection: number;
}
export interface Command<S> {