Skip to content

Commit

Permalink
chore(nuxt): use Exclude rather than Omit
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Feb 22, 2024
1 parent b5981f6 commit 3fc4231
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/nuxt/src/app/components/nuxt-link.ts
Expand Up @@ -98,18 +98,9 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
}
}

function resolveTrailingSlashBehavior (
to: string,
resolve: Router['resolve']
): string
function resolveTrailingSlashBehavior (
to: RouteLocationRaw,
resolve: Router['resolve']
): Omit<RouteLocationRaw, string>
function resolveTrailingSlashBehavior (
to: RouteLocationRaw,
resolve: Router['resolve']
): RouteLocationRaw | RouteLocation {
function resolveTrailingSlashBehavior (to: string, resolve: Router['resolve']): string
function resolveTrailingSlashBehavior (to: RouteLocationRaw, resolve: Router['resolve']): Exclude<RouteLocationRaw, string>
function resolveTrailingSlashBehavior (to: RouteLocationRaw, resolve: Router['resolve']): RouteLocationRaw | RouteLocation {
if (!to || (options.trailingSlash !== 'append' && options.trailingSlash !== 'remove')) {
return to
}
Expand Down

0 comments on commit 3fc4231

Please sign in to comment.