fix(types): router types fix for vue-router 3.3.3 (#7503)

This commit is contained in:
Kevin Marrec 2020-06-12 15:15:50 +02:00 committed by GitHub
parent 245d32d0dc
commit 752d587ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View File

@ -5,7 +5,10 @@
* 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'>> {
children?: NuxtRouteConfig[]

View File

@ -1,13 +1,13 @@
{
"compilerOptions": {
"target": "esnext",
"moduleResolution": "node",
"target": "ESNext",
"moduleResolution": "Node",
"strict": true,
"noEmit": true,
"lib": [
"esnext",
"esnext.asynciterable",
"dom"
"ESNext",
"ESNext.AsyncIterable",
"DOM"
]
}
}