chore(nuxt): use Exclude rather than Omit

This commit is contained in:
Daniel Roe 2024-02-22 11:55:14 +00:00
parent b5981f6840
commit 3fc4231d33
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -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
} }