Commit 58d9c87a authored by Ben Gubler's avatar Ben Gubler

fix: remove redundant union type in route validator

parent 902ad4ad
...@@ -448,7 +448,7 @@ export function generateValidatorFile( ...@@ -448,7 +448,7 @@ export function generateValidatorFile(
if (appPageValidations) { if (appPageValidations) {
typeDefinitions += `type AppPageConfig<Route extends AppRoutes = AppRoutes> = { typeDefinitions += `type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>) default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => void)
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[] generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
generateMetadata?: ( generateMetadata?: (
props: { params: Promise<ParamMap[Route]> } & any, props: { params: Promise<ParamMap[Route]> } & any,
...@@ -467,7 +467,7 @@ export function generateValidatorFile( ...@@ -467,7 +467,7 @@ export function generateValidatorFile(
if (pagesRouterPageValidations) { if (pagesRouterPageValidations) {
typeDefinitions += `type PagesPageConfig = { typeDefinitions += `type PagesPageConfig = {
default: React.ComponentType<any> | ((props: any) => React.ReactNode | Promise<React.ReactNode> | never | void) default: React.ComponentType<any>
getStaticProps?: (context: any) => Promise<any> | any getStaticProps?: (context: any) => Promise<any> | any
getStaticPaths?: (context: any) => Promise<any> | any getStaticPaths?: (context: any) => Promise<any> | any
getServerSideProps?: (context: any) => Promise<any> | any getServerSideProps?: (context: any) => Promise<any> | any
...@@ -489,7 +489,7 @@ export function generateValidatorFile( ...@@ -489,7 +489,7 @@ export function generateValidatorFile(
if (layoutValidations) { if (layoutValidations) {
typeDefinitions += `type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = { typeDefinitions += `type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>) default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => void)
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[] generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
generateMetadata?: ( generateMetadata?: (
props: { params: Promise<ParamMap[Route]> } & any, props: { params: Promise<ParamMap[Route]> } & any,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment