Skip to content

Commit 2599a77

Browse files
committed
fix: resolve TypeScript inference issue in client-path.ts
Add explicit type annotation for webssh2Client module to prevent TypeScript/ESLint from incorrectly inferring it as 'error' type. This fixes CI error: - Unsafe return of a value of type error - Unsafe call of an 'error' type typed value - Unsafe member access .getPublicPath on an 'error' typed value The explicit type cast helps TypeScript understand the module structure when type inference fails in certain environments.
1 parent 090c504 commit 2599a77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/client-path.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ const debug = createNamespacedDebug('client-path')
66

77
export function getClientPublicPath(): string {
88
try {
9-
return webssh2Client.getPublicPath()
9+
// Explicitly type the module to help TypeScript
10+
const client = webssh2Client as { getPublicPath: () => string }
11+
return client.getPublicPath()
1012
} catch (err) {
1113
debug('Falling back to DEFAULTS.WEBSSH2_CLIENT_PATH:', (err as { message?: string }).message)
1214
return DEFAULTS.WEBSSH2_CLIENT_PATH

0 commit comments

Comments
 (0)