diff options
Diffstat (limited to 'editor/editor.ts')
| -rw-r--r-- | editor/editor.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/editor.ts b/editor/editor.ts index e97b563..daa5cd2 100644 --- a/editor/editor.ts +++ b/editor/editor.ts @@ -7,13 +7,14 @@ const WUI_EDITOR_CLASS_LINE = "wui_editor_line" const WUI_EDITOR_CLASS_LINE_NUMBER = "wui_editor_line_number" const WUI_EDITOR_CLASS_LINE_TEXT = "wui_editor_line_text" -import { WuiVfsNodeInterface, WuiVfsResponseInterface } from "../vfs/vfs" +import { WuiResponseInterface } from "../response" +import { WuiVfsNodeInterface } from "../vfs/vfs" export interface WuiEditorOptions { id: string is_editable: boolean - OpenFile(path: string): WuiVfsResponseInterface + OpenFile(path: string): WuiResponseInterface // Handler that will be called when user select lines. OnSelection(begin: number, end: number): void @@ -317,10 +318,10 @@ export class WuiEditor { } } - async OpenFile(path: string): Promise<WuiVfsResponseInterface> { + async OpenFile(path: string): Promise<WuiResponseInterface> { let res = await this.opts.OpenFile(path) if (!res) { - return { code: 500 } as WuiVfsResponseInterface + return { code: 500 } as WuiResponseInterface } if (res.code != 200) { return res |
