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.
This commit is contained in:
LAPTOP-O016UC3M\Qi Chen committed 2025-12-16 11:41:55 +08:00
1 parent d637b7384f
commit fd3da63e9e
1 file changed
+1 -1
+1 -1
View File
@@ -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;