mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(types): router types fix for vue-router 3.3.3 (#7503)
This commit is contained in:
parent
245d32d0dc
commit
752d587ef1
5
packages/types/config/router.d.ts
vendored
5
packages/types/config/router.d.ts
vendored
@ -5,7 +5,10 @@
|
|||||||
* https://router.vuejs.org/api/#router-construction-options
|
* https://router.vuejs.org/api/#router-construction-options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { RouterOptions, RouteConfig } from 'vue-router'
|
import { RouterOptions, RouteConfig as _RouteConfig } from 'vue-router'
|
||||||
|
|
||||||
|
type UnionToIntersection<T> = (T extends any ? (k: T) => void : never) extends ((k: infer U) => void) ? U : never
|
||||||
|
type RouteConfig = UnionToIntersection<_RouteConfig>
|
||||||
|
|
||||||
export interface NuxtRouteConfig extends Pick<RouteConfig, Exclude<keyof RouteConfig, 'children' | 'component'>> {
|
export interface NuxtRouteConfig extends Pick<RouteConfig, Exclude<keyof RouteConfig, 'children' | 'component'>> {
|
||||||
children?: NuxtRouteConfig[]
|
children?: NuxtRouteConfig[]
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "esnext",
|
"target": "ESNext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "Node",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"lib": [
|
"lib": [
|
||||||
"esnext",
|
"ESNext",
|
||||||
"esnext.asynciterable",
|
"ESNext.AsyncIterable",
|
||||||
"dom"
|
"DOM"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user