diff options
| author | Kisaragi <48310258+KisaragiEffective@users.noreply.github.com> | 2023-03-13 20:04:14 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-13 20:04:14 +0900 |
| commit | 191233143fda8695220d91c25759b470650d27c9 (patch) | |
| tree | 0cf03aae765cf4a748677c2b01f27718ec7d3f3c /packages/frontend/src/scripts | |
| parent | enhance(backend): 配送先が410 Goneで応答してきた場合配送停止... (diff) | |
| download | misskey-191233143fda8695220d91c25759b470650d27c9.tar.gz misskey-191233143fda8695220d91c25759b470650d27c9.tar.bz2 misskey-191233143fda8695220d91c25759b470650d27c9.zip | |
refactor(frontend): 引数の型を強くし、関数内部のas anyを除去 (#10315)
Diffstat (limited to 'packages/frontend/src/scripts')
| -rw-r--r-- | packages/frontend/src/scripts/sound.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/sound.ts b/packages/frontend/src/scripts/sound.ts index b08982facb..35fd007e64 100644 --- a/packages/frontend/src/scripts/sound.ts +++ b/packages/frontend/src/scripts/sound.ts @@ -72,8 +72,8 @@ export function setVolume(audio: HTMLAudioElement, volume: number): HTMLAudioEle return audio; } -export function play(type: string) { - const sound = ColdDeviceStorage.get('sound_' + type as any); +export function play(type: 'noteMy' | 'note' | 'antenna' | 'channel' | 'notification') { + const sound = ColdDeviceStorage.get(`sound_${type}`); if (sound.type == null) return; playFile(sound.type, sound.volume); } |