Skip to content

Commit

Permalink
fix(clerk-sdk-node): Fix types of ClerkExpressWithAuth/ClerkExpressRe…
Browse files Browse the repository at this point in the history
…quireAuth args (#1939)

#1938
  • Loading branch information
dimkl committed Oct 26, 2023
1 parent 641de48 commit 5d379bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tasty-countries-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-sdk-node': patch
---

Fix types of ClerkExpressWithAuth/ClerkExpressRequireAuth args
4 changes: 2 additions & 2 deletions packages/sdk-node/src/clerkClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ReturnType<typeof createClerkExpressRequireAuth>>) => {
const env = { ...loadApiEnv(), ...loadClientEnv() };
const fn = createClerkExpressRequireAuth({ clerkClient, ...env });
return fn(...args);
};

export const ClerkExpressWithAuth = (...args: any) => {
export const ClerkExpressWithAuth = (...args: Parameters<ReturnType<typeof createClerkExpressWithAuth>>) => {
const env = { ...loadApiEnv(), ...loadClientEnv() };
const fn = createClerkExpressWithAuth({ clerkClient, ...env });
return fn(...args);
Expand Down

0 comments on commit 5d379bc

Please sign in to comment.