Remove dead code for Imaginate

This commit is contained in:
Keavon Chambers
2025-06-26 18:33:00 -07:00
parent 1a4d7aa23c
commit 1875779b0a
32 changed files with 23 additions and 2022 deletions

View File

@@ -47,9 +47,6 @@ export function createEditor(): Editor {
subscriptions.handleJsMessage(messageType, messageData, raw, handle);
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any).editorHandle = handle;
// Subscriptions: allows subscribing to messages in JS that are sent from the WASM backend
const subscriptions: SubscriptionRouter = createSubscriptionRouter();
@@ -76,12 +73,3 @@ export function createEditor(): Editor {
return { raw, handle, subscriptions };
}
// TODO: Find a better way to do this, since no other code takes this approach.
// TODO: Then, delete the `(window as any).editorHandle = handle;` line above.
// This function is called by an FFI binding within the Rust code directly, rather than using the FrontendMessage system.
// Then, this directly calls the `injectImaginatePollServerStatus` function on the `EditorHandle` object which is a JS binding generated by wasm-bindgen, going straight back into the Rust code.
// export function injectImaginatePollServerStatus() {
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// (window as any).editorHandle?.injectImaginatePollServerStatus();
// }