diff options
| author | bobzel <zzzman@gmail.com> | 2022-03-02 14:43:48 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-03-02 14:43:48 -0500 |
| commit | 398a50bc1d7e77691620a4a6752fd38d4bb391b0 (patch) | |
| tree | 42f56a2bc7cc1d661c3dfa61d49cc472fffb553c /src/client/util/DictationManager.ts | |
| parent | 35f0c9940d0ea7c0cb37c711557454b77ac038ad (diff) | |
upgraded to typescript 4.6.2
Diffstat (limited to 'src/client/util/DictationManager.ts')
| -rw-r--r-- | src/client/util/DictationManager.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/util/DictationManager.ts b/src/client/util/DictationManager.ts index a93b2f573..a086ac45e 100644 --- a/src/client/util/DictationManager.ts +++ b/src/client/util/DictationManager.ts @@ -1,4 +1,6 @@ import * as interpreter from "words-to-numbers"; +// @ts-ignore bcz: how are you supposed to include these definitions since dom-speech-recognition isn't a module? +import type { } from "@types/dom-speech-recognition"; import { Doc, Opt } from "../../fields/Doc"; import { List } from "../../fields/List"; import { RichTextField } from "../../fields/RichTextField"; @@ -13,6 +15,7 @@ import { DocumentView } from "../views/nodes/DocumentView"; import { SelectionManager } from "./SelectionManager"; import { UndoManager } from "./UndoManager"; + /** * This namespace provides a singleton instance of a manager that * handles the listening and text-conversion of user speech. @@ -112,7 +115,7 @@ export namespace DictationManager { } options?.tryExecute && await DictationManager.Commands.execute(results); } - } catch (e) { + } catch (e: any) { console.log(e); if (overlay) { DictationOverlay.Instance.isListening = false; @@ -188,7 +191,7 @@ export namespace DictationManager { current && sessionResults.push(current); sessionResults.length && resolve(sessionResults.join(inter || interSession)); } else { - resolve(current); + resolve(current || ""); } current = undefined; sessionResults = []; |
