refactor(frontend): 引数の型を強くし、関数内部のas anyを除去 (#10315)
This commit is contained in:
parent
b18df999cd
commit
191233143f
@ -72,8 +72,8 @@ export function setVolume(audio: HTMLAudioElement, volume: number): HTMLAudioEle
|
|||||||
return audio;
|
return audio;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function play(type: string) {
|
export function play(type: 'noteMy' | 'note' | 'antenna' | 'channel' | 'notification') {
|
||||||
const sound = ColdDeviceStorage.get('sound_' + type as any);
|
const sound = ColdDeviceStorage.get(`sound_${type}`);
|
||||||
if (sound.type == null) return;
|
if (sound.type == null) return;
|
||||||
playFile(sound.type, sound.volume);
|
playFile(sound.type, sound.volume);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user