diff options
| author | Shulhan <ms@kilabit.info> | 2023-10-24 03:41:47 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-10-24 22:28:25 +0700 |
| commit | 85c3fc0431e7e75a41894d4669f6a46bbda5440b (patch) | |
| tree | 15b73a82e9eaaa9ac9f2558578c8d7610ad392cd /editor/editor.d.ts | |
| parent | 891a860299ac76739d59f46280cbed63ff07743e (diff) | |
| download | pakakeh.ts-85c3fc0431e7e75a41894d4669f6a46bbda5440b.tar.xz | |
all: fix all linter warnings from tsc and eslint
In this changes we introduce eslint as our linter for TypeScript and
update our tsconfig to be more strict.
The ".eslintrc.yaml" and "tsconfig.json" is taken from golang/website
repository [1].
[1]: https://cs.opensource.google/go/x/website
Diffstat (limited to 'editor/editor.d.ts')
| -rw-r--r-- | editor/editor.d.ts | 110 |
1 files changed, 57 insertions, 53 deletions
diff --git a/editor/editor.d.ts b/editor/editor.d.ts index ccd669e..29ab3b6 100644 --- a/editor/editor.d.ts +++ b/editor/editor.d.ts @@ -1,63 +1,67 @@ import { WuiVfsNodeInterface } from "../vfs/vfs"; export interface WuiEditorOptions { - id: string; - is_editable: boolean; - OnSelection(begin: number, end: number): void; - OnSave(content: string): void; + id: string; + is_editable: boolean; + OnSelection(begin: number, end: number): void; + OnSave(content: string): void; } export declare class WuiEditor { - opts: WuiEditorOptions; - id: string; - is_editable: boolean; - lines: WuiEditorLine[]; - private el; - private sel; - private active_file; - private active_text; - private range_begin; - private range_end; - private raw_lines; - private range; - private is_key_control; - private unre; - constructor(opts: WuiEditorOptions); - GetContent(): string; - GetSelectionRange(): WuiEditorSelectionRangeInterface; - OnClickText(text: HTMLElement): void; - OnKeyup(x: number, text: HTMLElement, ev: KeyboardEvent): boolean | undefined; - OnKeydownOnLine(x: number, el_text: HTMLElement, ev: KeyboardEvent): false | undefined; - OnMouseDownAtLine(x: number): void; - OnMouseUpAtLine(x: number): void; - SetEditOff(): void; - SetEditOn(): void; - Open(node: WuiVfsNodeInterface): void; - ClearSelection(): void; - private initStyle; - private doJoin; - private doSplit; - private doUpdate; - private doRedo; - private doUndo; - private deleteLine; - private insertNewline; - private onKeyupDocument; - private render; - private setCaret; + opts: WuiEditorOptions; + id: string; + is_editable: boolean; + lines: WuiEditorLine[]; + private el; + private sel; + private active_file; + private active_text; + private range_begin; + private range_end; + private raw_lines; + private range; + private is_key_control; + private unre; + constructor(opts: WuiEditorOptions); + GetContent(): string; + GetSelectionRange(): WuiEditorSelectionRangeInterface; + OnClickText(text: HTMLElement): void; + OnKeyup(x: number, text: HTMLElement, ev: KeyboardEvent): boolean | undefined; + OnKeydownOnLine( + x: number, + el_text: HTMLElement, + ev: KeyboardEvent, + ): false | undefined; + OnMouseDownAtLine(x: number): void; + OnMouseUpAtLine(x: number): void; + SetEditOff(): void; + SetEditOn(): void; + Open(node: WuiVfsNodeInterface): void; + ClearSelection(): void; + private initStyle; + private doJoin; + private doSplit; + private doUpdate; + private doRedo; + private doUndo; + private deleteLine; + private insertNewline; + private onKeyupDocument; + private render; + private setCaret; } declare class WuiEditorLine { - x: number; - text: string; - private line_num; - el: HTMLElement; - el_number: HTMLElement; - el_text: HTMLElement; - constructor(x: number, text: string, ed: WuiEditor); - SetNumber(x: number): void; - SetEditOn(): void; - SetEditOff(): void; + x: number; + text: string; + private line_num; + el: HTMLElement; + el_number: HTMLElement; + el_text: HTMLElement; + constructor(x: number, text: string, ed: WuiEditor); + SetNumber(x: number): void; + SetEditOn(): void; + SetEditOff(): void; } interface WuiEditorSelectionRangeInterface { - begin_at: number; - end_at: number; + begin_at: number; + end_at: number; } export {}; |
