import { Cell, Optional } from '@ephox/katamari'; import type { ReflectingState } from './ReflectingTypes'; const init = (): ReflectingState => { const cell = Cell(Optional.none()); const clear = () => cell.set(Optional.none()); const readState = (): any => cell.get().getOr('none'); return { readState, get: cell.get, set: cell.set, clear }; }; export { init };