From 237f64ff34bed7ee45af42156879ec745dd693e1 Mon Sep 17 00:00:00 2001 From: "Daniel W. Steinbrook" Date: Thu, 21 Nov 2024 23:25:37 -0500 Subject: [PATCH] Convert more components to TypeScript --- src/components/BeaconController.vue | 2 +- src/components/CalloutList.vue | 27 +++++++++++++++------------ src/components/VoiceSelector.vue | 14 ++++++++------ src/shims-vue.d.ts | 5 +++++ src/state/audio.ts | 4 ++-- 5 files changed, 31 insertions(+), 21 deletions(-) create mode 100644 src/shims-vue.d.ts diff --git a/src/components/BeaconController.vue b/src/components/BeaconController.vue index e8d91f5..521c8ac 100644 --- a/src/components/BeaconController.vue +++ b/src/components/BeaconController.vue @@ -20,7 +20,7 @@

- \ No newline at end of file diff --git a/src/shims-vue.d.ts b/src/shims-vue.d.ts new file mode 100644 index 0000000..e98bce1 --- /dev/null +++ b/src/shims-vue.d.ts @@ -0,0 +1,5 @@ +declare module '*.vue' { + import { DefineComponent } from 'vue'; + const component: DefineComponent<{}, {}, any>; + export default component; +} \ No newline at end of file diff --git a/src/state/audio.ts b/src/state/audio.ts index 1a5d260..705f6c7 100644 --- a/src/state/audio.ts +++ b/src/state/audio.ts @@ -98,7 +98,7 @@ export async function playSpatialSpeech(text: string, voiceIndex: number, rate: }); } -type SpeechSynthesisVoiceWithIndex = SpeechSynthesisVoice & { +export type SpeechSynthesisVoiceWithIndex = SpeechSynthesisVoice & { voiceIndex: number; } @@ -106,7 +106,7 @@ interface QueuedEffect { soundUrl: string; location?: Feature; } -interface QueuedSpeech { +export interface QueuedSpeech { text: string; location?: Feature; includeDistance?: boolean;