File tree 1 file changed +5
-4
lines changed
packages/next/src/build/webpack/plugins
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,6 @@ function createRouteDefinitions(
196
196
}
197
197
}
198
198
199
- const fallback = ! edgeRoutes . length && ! nodeRoutes . length ? 'string' : ''
200
199
const routes = [ ...edgeRoutes , ...nodeRoutes , ...extraRoutes ]
201
200
202
201
// By exposing the static route types separately as string literals,
@@ -267,10 +266,12 @@ declare namespace __next_route_internal_types__ {
267
266
type OptionalCatchAllSlug<S extends string> =
268
267
S extends \`\${string}\${SearchOrHash}\` ? never : S
269
268
270
- type StaticRoutes = ${ staticRouteTypes }
271
- type DynamicRoutes<T extends string = string> = ${ dynamicRouteTypes }
269
+ type StaticRoutes = ${ staticRouteTypes || 'string' }
270
+ type DynamicRoutes<T extends string = string> = ${
271
+ dynamicRouteTypes || 'string'
272
+ }
272
273
273
- type RouteImpl<T> = ${ fallback }
274
+ type RouteImpl<T> =
274
275
| StaticRoutes
275
276
| \`\${StaticRoutes}\${Suffix}\`
276
277
| (T extends \`\${DynamicRoutes<infer _>}\${Suffix}\` ? T : never)
You can’t perform that action at this time.
0 commit comments