simplify rollback
This commit is contained in:
parent
ebae0afc81
commit
0a9dbd454f
4 changed files with 57 additions and 26 deletions
22
src/LetInBlock.tsx
Normal file
22
src/LetInBlock.tsx
Normal 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}) {
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue