From 1238c2228538b43b653cdf506ed46a3dec776a53 Mon Sep 17 00:00:00 2001 From: Dimitris Klouvas Date: Wed, 25 Oct 2023 11:32:20 -0700 Subject: [PATCH] fix(clerk-sdk-node): Fix types of ClerkExpressWithAuth/ClerkExpressRequireAuth args https://github.com/clerkinc/javascript/issues/1938 --- .changeset/tasty-countries-walk.md | 5 +++++ packages/sdk-node/src/clerkClient.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/tasty-countries-walk.md diff --git a/.changeset/tasty-countries-walk.md b/.changeset/tasty-countries-walk.md new file mode 100644 index 0000000000..f6ceef5af0 --- /dev/null +++ b/.changeset/tasty-countries-walk.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-sdk-node': patch +--- + +Fix types of ClerkExpressWithAuth/ClerkExpressRequireAuth args diff --git a/packages/sdk-node/src/clerkClient.ts b/packages/sdk-node/src/clerkClient.ts index 6f9cc6a35b..b562f45079 100644 --- a/packages/sdk-node/src/clerkClient.ts +++ b/packages/sdk-node/src/clerkClient.ts @@ -75,13 +75,13 @@ export const clerkClient = new Proxy(clerkClientSingleton, { /** * Stand-alone express middlewares bound to the pre-initialised clerkClient */ -export const ClerkExpressRequireAuth = (...args: any) => { +export const ClerkExpressRequireAuth = (...args: Parameters>) => { const env = { ...loadApiEnv(), ...loadClientEnv() }; const fn = createClerkExpressRequireAuth({ clerkClient, ...env }); return fn(...args); }; -export const ClerkExpressWithAuth = (...args: any) => { +export const ClerkExpressWithAuth = (...args: Parameters>) => { const env = { ...loadApiEnv(), ...loadClientEnv() }; const fn = createClerkExpressWithAuth({ clerkClient, ...env }); return fn(...args);