aboutsummaryrefslogtreecommitdiff
path: root/editor/editor.d.ts
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-08-29 13:53:00 +0700
committerShulhan <ms@kilabit.info>2021-08-29 13:53:00 +0700
commit7940feda7d50c404fb245b645c8261d6cb4dd768 (patch)
tree1d688fde2e998e8c2fb1cfd9b0ccf53022743177 /editor/editor.d.ts
parent51e7db8b61ec21628fc0ed2f5f48bfff47962684 (diff)
downloadpakakeh.ts-7940feda7d50c404fb245b645c8261d6cb4dd768.tar.xz
editor: simplify the Open method
Previously, the Open method call the predefined options OpenFile, which in turn may send request to remote server. This changes simplify it by accepting node interface that has been filled with content and metadata.
Diffstat (limited to 'editor/editor.d.ts')
-rw-r--r--editor/editor.d.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/editor.d.ts b/editor/editor.d.ts
index 14f3675..f26acd3 100644
--- a/editor/editor.d.ts
+++ b/editor/editor.d.ts
@@ -1,8 +1,7 @@
-import { WuiResponseInterface } from "../response";
+import { WuiVfsNodeInterface } from "../vfs/vfs";
export interface WuiEditorOptions {
id: string;
is_editable: boolean;
- OpenFile(path: string): WuiResponseInterface;
OnSelection(begin: number, end: number): void;
OnSave(content: string): void;
}
@@ -31,7 +30,7 @@ export declare class WuiEditor {
OnMouseUpAtLine(x: number): void;
SetEditOff(): void;
SetEditOn(): void;
- OpenFile(path: string): Promise<WuiResponseInterface>;
+ Open(node: WuiVfsNodeInterface): void;
private clearSelection;
private initStyle;
private doJoin;