mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
chore(nuxt): use Exclude rather than Omit
This commit is contained in:
parent
b5981f6840
commit
3fc4231d33
@ -98,18 +98,9 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveTrailingSlashBehavior (
|
function resolveTrailingSlashBehavior (to: string, resolve: Router['resolve']): string
|
||||||
to: string,
|
function resolveTrailingSlashBehavior (to: RouteLocationRaw, resolve: Router['resolve']): Exclude<RouteLocationRaw, string>
|
||||||
resolve: Router['resolve']
|
function resolveTrailingSlashBehavior (to: RouteLocationRaw, resolve: Router['resolve']): RouteLocationRaw | RouteLocation {
|
||||||
): string
|
|
||||||
function resolveTrailingSlashBehavior (
|
|
||||||
to: RouteLocationRaw,
|
|
||||||
resolve: Router['resolve']
|
|
||||||
): Omit<RouteLocationRaw, string>
|
|
||||||
function resolveTrailingSlashBehavior (
|
|
||||||
to: RouteLocationRaw,
|
|
||||||
resolve: Router['resolve']
|
|
||||||
): RouteLocationRaw | RouteLocation {
|
|
||||||
if (!to || (options.trailingSlash !== 'append' && options.trailingSlash !== 'remove')) {
|
if (!to || (options.trailingSlash !== 'append' && options.trailingSlash !== 'remove')) {
|
||||||
return to
|
return to
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user