mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Include codemirror libs for svelte
This commit is contained in:
parent
c663785264
commit
a3fef552bd
2 changed files with 4 additions and 2 deletions
|
@ -22,6 +22,8 @@ compile_svelte(
|
|||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//ts/components",
|
||||
"@npm//@types/codemirror",
|
||||
"@npm//codemirror",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
export class ChangeTimer {
|
||||
private value: number | null = null;
|
||||
|
||||
schedule(action: () => void, delay: number) {
|
||||
schedule(action: () => void, delay: number): void {
|
||||
this.clear();
|
||||
this.value = setTimeout(action, delay);
|
||||
}
|
||||
|
||||
clear() {
|
||||
clear(): void {
|
||||
if (this.value) {
|
||||
clearTimeout(this.value);
|
||||
this.value = null;
|
||||
|
|
Loading…
Reference in a new issue