Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClerkExpressRequireAuth doesn't have any argument types #1938

Closed
4 tasks done
tmcw opened this issue Oct 25, 2023 · 2 comments
Closed
4 tasks done

ClerkExpressRequireAuth doesn't have any argument types #1938

tmcw opened this issue Oct 25, 2023 · 2 comments
Assignees
Labels
prioritized This issue has been triaged and the team is working on it

Comments

@tmcw
Copy link

tmcw commented Oct 25, 2023

Preliminary Checks

Reproduction / Replay Link

.

Publishable key

.

Description

Steps to reproduce:

  1. Import and use ClerkExpressWithAuth

Expected behavior:

The method should require its arguments are ClerkMiddlewareOptions like here:

https://github.com/clerkinc/javascript/blob/main/packages/sdk-node/src/clerkExpressWithAuth.ts#L13C20-L13C42

Actual behavior:

It doesn't, the wrapper method has type ...args: any:

https://github.com/clerkinc/javascript/blob/main/packages/sdk-node/src/clerkClient.ts#L78

So, you don't get any type safety using this method.

Environment

This is in the main branch of this repo.
@tmcw tmcw added the needs-triage A ticket that needs to be triaged by a team member label Oct 25, 2023
@dimkl dimkl self-assigned this Oct 25, 2023
@jescalan jescalan added prioritized This issue has been triaged and the team is working on it and removed needs-triage A ticket that needs to be triaged by a team member labels Oct 30, 2023
github-merge-queue bot pushed a commit that referenced this issue Oct 31, 2023
* fix(clerk-sdk-node): Fix types of ClerkExpressWithAuth/ClerkExpressRequireAuth args (#1939)

#1938

* fix(backend): Support NextJS 14 (#1948)

* fix(backend): Fix for next 14 fetch bind issue

* fix(nextjs): Use named imports for fetch runtime polyfill

Next14 seems to have changed the way it handles default exports when using the webpack bundler for some of their build variants when using `npm run dev`. This commit ensures that we no longer use the default export in an effort to improve compat between the different nextjs versions.

More information can be found here: https://esbuild.github.io/content-types/#default-interop
and here: #612

* Create late-dolphins-peel.md

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>

---------

Co-authored-by: George Desipris <73396808+desiprisg@users.noreply.github.com>
Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
@tmcw
Copy link
Author

tmcw commented Mar 5, 2024

Is this fixed? It seems fixed, but is not closed.

@LekoArts
Copy link
Member

LekoArts commented Mar 6, 2024

This was fixed by #1939, yes 👍

@LekoArts LekoArts closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prioritized This issue has been triaged and the team is working on it
Projects
None yet
Development

No branches or pull requests

4 participants