Fix some loose typing
This commit is contained in:
parent
a31410d2c1
commit
56595757a5
|
@ -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>
|
||||||
) => {
|
) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user