mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
fix(ts): fix extendRoutes
method type (#5700)
Co-authored-by: René Stalder <renestalder@protonmail.com>
This commit is contained in:
parent
8019c9c7db
commit
501c58608c
3
packages/config/types/index.d.ts
vendored
3
packages/config/types/index.d.ts
vendored
@ -9,7 +9,7 @@ import { NuxtConfigurationLoading, NuxtConfigurationLoadingIndicator } from './l
|
|||||||
import { NuxtConfigurationModule } from './module'
|
import { NuxtConfigurationModule } from './module'
|
||||||
import { NuxtConfigurationPlugin } from './plugin'
|
import { NuxtConfigurationPlugin } from './plugin'
|
||||||
import { NuxtConfigurationRender } from './render'
|
import { NuxtConfigurationRender } from './render'
|
||||||
import { NuxtConfigurationRouter } from './router'
|
import { NuxtConfigurationRouter, NuxtRouteConfig } from './router'
|
||||||
import { NuxtConfigurationServer } from './server'
|
import { NuxtConfigurationServer } from './server'
|
||||||
import { NuxtConfigurationServerMiddleware } from './server-middleware'
|
import { NuxtConfigurationServerMiddleware } from './server-middleware'
|
||||||
import { NuxtConfigurationVueConfiguration } from './vue-configuration'
|
import { NuxtConfigurationVueConfiguration } from './vue-configuration'
|
||||||
@ -65,6 +65,7 @@ export {
|
|||||||
NuxtConfigurationPlugin as Plugin,
|
NuxtConfigurationPlugin as Plugin,
|
||||||
NuxtConfigurationRender as Render,
|
NuxtConfigurationRender as Render,
|
||||||
NuxtConfigurationRouter as Router,
|
NuxtConfigurationRouter as Router,
|
||||||
|
NuxtRouteConfig as RouteConfig,
|
||||||
NuxtConfigurationServer as Server,
|
NuxtConfigurationServer as Server,
|
||||||
NuxtConfigurationServerMiddleware as ServerMiddleware,
|
NuxtConfigurationServerMiddleware as ServerMiddleware,
|
||||||
NuxtConfigurationVueConfiguration as VueConfiguration,
|
NuxtConfigurationVueConfiguration as VueConfiguration,
|
||||||
|
8
packages/config/types/router.d.ts
vendored
8
packages/config/types/router.d.ts
vendored
@ -5,11 +5,15 @@
|
|||||||
* https://router.vuejs.org/api/#router-construction-options
|
* https://router.vuejs.org/api/#router-construction-options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { RouterOptions, Route } from 'vue-router'
|
import { RouterOptions, RouteConfig } from 'vue-router'
|
||||||
|
|
||||||
|
export interface NuxtRouteConfig extends RouteConfig {
|
||||||
|
chunkNames: { [key: string]: string }
|
||||||
|
}
|
||||||
|
|
||||||
export interface NuxtConfigurationRouter extends RouterOptions {
|
export interface NuxtConfigurationRouter extends RouterOptions {
|
||||||
routeNameSplitter?: string
|
routeNameSplitter?: string
|
||||||
extendRoutes?: (routes: Route[], resolve: (...pathSegments: string[]) => string) => void
|
extendRoutes?(routes: NuxtRouteConfig[], resolve: (...pathSegments: string[]) => string): void
|
||||||
linkPrefetchedClass?: string
|
linkPrefetchedClass?: string
|
||||||
middleware?: string | string[]
|
middleware?: string | string[]
|
||||||
prefetchLinks?: boolean
|
prefetchLinks?: boolean
|
||||||
|
Loading…
Reference in New Issue
Block a user