1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-10-31 15:21:46 +09:00

refactor(frontend): 引数の型を強くし、関数内部のas anyを除去 (#10315)

This commit is contained in:
Kisaragi 2023-03-13 20:04:14 +09:00 committed by GitHub
parent b18df999cd
commit 191233143f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}