fix: update CustomEditor constructor
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { Editor, type EditorTheme, Key, matchesKey, type TUI } from "@mariozechner/pi-tui";
|
import { Editor, type EditorOptions, type EditorTheme, type TUI, Key, matchesKey } from "@mariozechner/pi-tui";
|
||||||
|
|
||||||
export class CustomEditor extends Editor {
|
export class CustomEditor extends Editor {
|
||||||
onEscape?: () => void;
|
onEscape?: () => void;
|
||||||
@@ -12,8 +12,8 @@ export class CustomEditor extends Editor {
|
|||||||
onShiftTab?: () => void;
|
onShiftTab?: () => void;
|
||||||
onAltEnter?: () => void;
|
onAltEnter?: () => void;
|
||||||
|
|
||||||
constructor(tui: TUI, theme: EditorTheme) {
|
constructor(tui: TUI, theme: EditorTheme, options?: EditorOptions) {
|
||||||
super(tui, theme);
|
super(tui, theme, options);
|
||||||
}
|
}
|
||||||
handleInput(data: string): void {
|
handleInput(data: string): void {
|
||||||
if (matchesKey(data, Key.alt("enter")) && this.onAltEnter) {
|
if (matchesKey(data, Key.alt("enter")) && this.onAltEnter) {
|
||||||
|
|||||||
Reference in New Issue
Block a user