diff --git a/src/start-proxy/validation.ts b/src/start-proxy/validation.ts index 878f2eb4d..6603a4776 100644 --- a/src/start-proxy/validation.ts +++ b/src/start-proxy/validation.ts @@ -7,10 +7,10 @@ import type { AuthConfig, UsernamePassword } from "./types"; import * as types from "./types"; /** Constructs a new object from `obj` with only keys that exist in `schema`. */ -export function cloneCredential< - T extends json.FromSchema, - S extends json.Schema, ->(schema: S, obj: T): T { +export function cloneCredential( + schema: S, + obj: json.FromSchema, +): json.FromSchema { const result = {}; for (const key of Object.keys(schema)) { @@ -21,7 +21,7 @@ export function cloneCredential< result[key] = obj[key]; } - return result as T; + return result as json.FromSchema; } /** Extracts an `AuthConfig` value from `config`. */