aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/editor/EditorStore.ts
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/editor/EditorStore.ts')
-rw-r--r--subprojects/frontend/src/editor/EditorStore.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/subprojects/frontend/src/editor/EditorStore.ts b/subprojects/frontend/src/editor/EditorStore.ts
index 9508858d..87c4040e 100644
--- a/subprojects/frontend/src/editor/EditorStore.ts
+++ b/subprojects/frontend/src/editor/EditorStore.ts
@@ -74,7 +74,11 @@ export default class EditorStore {
74 74
75 selectedGeneratedModel: string | undefined; 75 selectedGeneratedModel: string | undefined;
76 76
77 constructor(initialValue: string, pwaStore: PWAStore) { 77 constructor(
78 initialValue: string,
79 pwaStore: PWAStore,
80 onUpdate: (text: string) => void,
81 ) {
78 this.id = nanoid(); 82 this.id = nanoid();
79 this.state = createEditorState(initialValue, this); 83 this.state = createEditorState(initialValue, this);
80 this.delayedErrors = new EditorErrors(this); 84 this.delayedErrors = new EditorErrors(this);
@@ -86,7 +90,7 @@ export default class EditorStore {
86 if (this.disposed) { 90 if (this.disposed) {
87 return; 91 return;
88 } 92 }
89 this.client = new LazyXtextClient(this, pwaStore); 93 this.client = new LazyXtextClient(this, pwaStore, onUpdate);
90 this.client.start(); 94 this.client.start();
91 }); 95 });
92 })().catch((error) => { 96 })().catch((error) => {