Skip to content

Commit 53f3284

Browse files
committed
MD Editor: Last tests/check over plaintext use/switching
1 parent 7ca8bdc commit 53f3284

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

resources/js/markdown/index.mts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ export async function init(config: MarkdownEditorConfig): Promise<MarkdownEditor
6262
editor.input.teardown();
6363
editor.input = newInput;
6464
});
65-
window.devinput = editor.input;
6665

6766
listenToCommonEvents(editor);
6867

resources/js/services/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* leading edge, instead of the trailing.
66
* @attribution https://davidwalsh.name/javascript-debounce-function
77
*/
8-
export function debounce(func: Function, waitMs: number, immediate: boolean): Function {
8+
export function debounce<T extends (...args: any[]) => any>(func: T, waitMs: number, immediate: boolean): T {
99
let timeout: number|null = null;
1010
return function debouncedWrapper(this: any, ...args: any[]) {
1111
const context: any = this;
@@ -19,7 +19,7 @@ export function debounce(func: Function, waitMs: number, immediate: boolean): Fu
1919
}
2020
timeout = window.setTimeout(later, waitMs);
2121
if (callNow) func.apply(context, args);
22-
};
22+
} as T;
2323
}
2424

2525
function isDetailsElement(element: HTMLElement): element is HTMLDetailsElement {

0 commit comments

Comments
 (0)