fix(ui): specify JsonRpcResponse type

This commit is contained in:
Adam Shiervani 2025-09-08 11:36:56 +02:00
parent a6f2f075ff
commit 3295b3a96a
1 changed files with 3 additions and 3 deletions

View File

@ -65,12 +65,12 @@ export default function SettingsVideoRoute() {
useEffect(() => { useEffect(() => {
setEdidLoading(true); setEdidLoading(true);
send("getStreamQualityFactor", {}, resp => { send("getStreamQualityFactor", {}, (resp: JsonRpcResponse) => {
if ("error" in resp) return; if ("error" in resp) return;
setStreamQuality(String(resp.result)); setStreamQuality(String(resp.result));
}); });
send("getEDID", {}, resp => { send("getEDID", {}, (resp: JsonRpcResponse) => {
setEdidLoading(false); setEdidLoading(false);
if ("error" in resp) { if ("error" in resp) {
notifications.error(`Failed to get EDID: ${resp.error.data || "Unknown error"}`); notifications.error(`Failed to get EDID: ${resp.error.data || "Unknown error"}`);
@ -117,7 +117,7 @@ export default function SettingsVideoRoute() {
const handleEDIDChange = (newEdid: string) => { const handleEDIDChange = (newEdid: string) => {
setEdidLoading(true); setEdidLoading(true);
send("setEDID", { edid: newEdid }, resp => { send("setEDID", { edid: newEdid }, (resp: JsonRpcResponse) => {
setEdidLoading(false); setEdidLoading(false);
if ("error" in resp) { if ("error" in resp) {
notifications.error(`Failed to set EDID: ${resp.error.data || "Unknown error"}`); notifications.error(`Failed to set EDID: ${resp.error.data || "Unknown error"}`);