From fd3da63e9ecc000050caf7bac2ee4bf3a4ad4e02 Mon Sep 17 00:00:00 2001 From: "LAPTOP-O016UC3M\\Qi Chen" <16399091+binaricat@users.noreply.github.com> Date: Tue, 16 Dec 2025 11:41:55 +0800 Subject: [PATCH] Add explicit return type to credentials callback Enforces type safety by specifying the return type for the host credentials retrieval function, making the codebase more robust and maintainable. --- application/state/useSftpState.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/state/useSftpState.ts b/application/state/useSftpState.ts index cba63fb27..490518c23 100644 --- a/application/state/useSftpState.ts +++ b/application/state/useSftpState.ts @@ -288,7 +288,7 @@ export const useSftpState = (hosts: Host[], keys: SSHKey[]) => { // Get host credentials const getHostCredentials = useCallback( - (host: Host) => { + (host: Host): NetcattySSHOptions => { const key = host.identityFileId ? keys.find((k) => k.id === host.identityFileId) : null;