diff --git a/src/mathquill.d.ts b/src/mathquill.d.ts index e2a080b2c..e6cc05fd8 100644 --- a/src/mathquill.d.ts +++ b/src/mathquill.d.ts @@ -22,19 +22,19 @@ declare namespace MathQuill { interface BaseMathQuill { id: number; data: { [key: string]: any }; - config(opts: Config): BaseMathQuill; + config(opts: Config): T; revert: () => HTMLElement; - latex(latex: string): BaseMathQuill; + latex(latex: string): T; latex(): string; reflow: () => void; el: () => HTMLElement; getAriaLabel(): string; - setAriaLabel(str: string): BaseMathQuill; + setAriaLabel(str: string): T; html: () => string; mathspeak: () => string; text(): string; - blur: () => void; - focus: () => void; + blur(): T; + focus(): T; selection(): { latex: string; startIndex: number; @@ -42,25 +42,7 @@ declare namespace MathQuill { }; } - interface EditableMathQuill { - id: number; - data: { [key: string]: any }; - revert: () => HTMLElement; - config(opts: Config): EditableMathQuill; - latex(latex: string): EditableMathQuill; - latex(): string; - reflow: () => void; - el: () => HTMLElement; - getAriaLabel(): string; - setAriaLabel(str: string): EditableMathQuill; - html: () => string; - mathspeak: () => string; - text(): string; - selection(): { - latex: string; - startIndex: number; - endIndex: number; - }; + interface EditableMathQuill extends BaseMathQuill { select: () => EditableMathQuill; moveToRightEnd: () => EditableMathQuill; moveToLeftEnd: () => EditableMathQuill; @@ -69,8 +51,6 @@ declare namespace MathQuill { keystroke: (key: string, evt?: KeyboardEvent) => EditableMathQuill; typedText: (text: string) => EditableMathQuill; clearSelection: () => EditableMathQuill; - blur: () => EditableMathQuill; - focus: () => EditableMathQuill; getAriaPostLabel: () => string; setAriaPostLabel: (str: string, timeout?: number) => EditableMathQuill; ignoreNextMousedown: (func: () => boolean) => EditableMathQuill;