simplify rollback

This commit is contained in:
Joeri Exelmans 2025-05-12 11:26:37 +02:00
parent ebae0afc81
commit 0a9dbd454f
4 changed files with 57 additions and 26 deletions

22
src/LetInBlock.tsx Normal file
View file

@ -0,0 +1,22 @@
import type { EditorState } from "./Editor";
import type { Dynamic, State2Props } from "./util/extra";
export interface LetInBlockState {
kind: "let";
env: any;
name: string;
value: EditorState;
inner: EditorState;
resolved: undefined | Dynamic;
rollback?: EditorState;
}
interface LetInBlockProps extends State2Props<LetInBlockState> {
onResolve: (resolved: EditorState) => void;
}
export function LetInBlock({env, name, value, inner, resolved, rollback, onResolve}) {
}