Fix some loose typing

This commit is contained in:
Marshall Polaris 2022-08-30 01:15:14 -07:00
parent a31410d2c1
commit 56595757a5

View File

@ -170,7 +170,7 @@ type GetServerSidePropsAuthed<P> = (
creds: UserCredential creds: UserCredential
) => Promise<GetServerSidePropsResult<P>> ) => Promise<GetServerSidePropsResult<P>>
export const redirectIfLoggedIn = <P>( export const redirectIfLoggedIn = <P extends { [k: string]: any }>(
dest: string, dest: string,
fn?: GetServerSideProps<P> fn?: GetServerSideProps<P>
) => { ) => {
@ -191,7 +191,7 @@ export const redirectIfLoggedIn = <P>(
} }
} }
export const redirectIfLoggedOut = <P>( export const redirectIfLoggedOut = <P extends { [k: string]: any }>(
dest: string, dest: string,
fn?: GetServerSidePropsAuthed<P> fn?: GetServerSidePropsAuthed<P>
) => { ) => {