mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-17 13:01:24 +00:00
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:
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user