stack-auth / stack

Open-source Auth0/Clerk alternative
https://stack-auth.com
Other
3.32k stars 222 forks source link

Type of props on Handler #210

Closed gepless closed 1 month ago

gepless commented 1 month ago

Is it possible to get type on props instead of any as per the screenshot?

image
fomalhautb commented 1 month ago

https://github.com/stack-auth/stack/blob/be6180db06914a8e00670df3bb5c90208871bfde/packages/stack/src/components-page/stack-handler.tsx#L17-L27

The type of the handler is here

So the type of the props should be

{
  params?: { stack?: string[] }, 
  searchParams?: Record<string, string>,
}