Skip to content

Commit

Permalink
revert: "feat: allow handlers to narrow props type"
Browse files Browse the repository at this point in the history
This reverts commit b93c730.
  • Loading branch information
smeijer committed Sep 13, 2021
1 parent f294e59 commit a47bcd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ type Handlers<
upload?: BodyParserOptions['onFile'];

// The GET request handler, this is the default getServerSideProps
get: <T = P>(
get: (
context: GetServerSidePropsContext<Q> & CookieJar & TypedHeaders,
) => Promise<GetServerSidePropsResult<T>>;
) => Promise<GetServerSidePropsResult<P>>;

// The POST request handler, awesome to submit forms to!
post: <T = P>(
post: (
context: GetServerSidePropsContext<Q> & { req: { body: F } } & CookieJar &
TypedHeaders,
) => Promise<GetServerSidePropsResult<T>>;
) => Promise<GetServerSidePropsResult<P>>;
};

export function handle<
Expand Down

0 comments on commit a47bcd2

Please sign in to comment.