Skip to content

Commit

Permalink
Add Props and Query to GetServerSidePropsWrapper type (#731)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath authored Jun 16, 2022
1 parent a45bf12 commit b002ce0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/helpers/get-server-side-props-wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { GetServerSideProps } from 'next';
import { ParsedUrlQuery } from 'querystring';
import SessionCache from '../session/cache';

/**
Expand Down Expand Up @@ -30,7 +31,9 @@ import SessionCache from '../session/cache';
*
* @category Server
*/
export type GetServerSidePropsWrapper = (getServerSideProps: GetServerSideProps) => GetServerSideProps;
export type GetServerSidePropsWrapper<P = any, Q extends ParsedUrlQuery = ParsedUrlQuery> = (
getServerSideProps: GetServerSideProps<P, Q>
) => GetServerSideProps<P, Q>;

/**
* @ignore
Expand Down

0 comments on commit b002ce0

Please sign in to comment.