use std::any::Any;
pub trait CommandHandler {
fn name(&self) -> &str;
fn handle(&self, input: &dyn Any) -> Box<dyn Any>;
import { useReducer, useCallback } from 'react';
const initialState = (present) => ({ past: [], present, future: [] });
function historyReducer(state, action) {
const { past, present, future } = state;
use std::collections::HashMap;
use serde_json::Value;
#[derive(Debug)]
pub enum DispatchError {
UnknownCommand(String),
export interface DocState {
text: string;
selection: number;
}
export interface Command<S> {