diff options
| author | Shulhan <ms@kilabit.info> | 2021-08-29 13:53:00 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-08-29 13:53:00 +0700 |
| commit | 7940feda7d50c404fb245b645c8261d6cb4dd768 (patch) | |
| tree | 1d688fde2e998e8c2fb1cfd9b0ccf53022743177 /editor/editor.d.ts | |
| parent | 51e7db8b61ec21628fc0ed2f5f48bfff47962684 (diff) | |
| download | pakakeh.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.ts | 5 |
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; |
