Skip to content

Commit b002ce0

Browse files
authored
Add Props and Query to GetServerSidePropsWrapper type (#731)
1 parent a45bf12 commit b002ce0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/helpers/get-server-side-props-wrapper.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { GetServerSideProps } from 'next';
2+
import { ParsedUrlQuery } from 'querystring';
23
import SessionCache from '../session/cache';
34

45
/**
@@ -30,7 +31,9 @@ import SessionCache from '../session/cache';
3031
*
3132
* @category Server
3233
*/
33-
export type GetServerSidePropsWrapper = (getServerSideProps: GetServerSideProps) => GetServerSideProps;
34+
export type GetServerSidePropsWrapper<P = any, Q extends ParsedUrlQuery = ParsedUrlQuery> = (
35+
getServerSideProps: GetServerSideProps<P, Q>
36+
) => GetServerSideProps<P, Q>;
3437

3538
/**
3639
* @ignore

0 commit comments

Comments
 (0)