From 3fc4231d337c9270ac87f26e5717b8afce2e1417 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 22 Feb 2024 11:55:14 +0000 Subject: [PATCH] chore(nuxt): use Exclude rather than Omit --- packages/nuxt/src/app/components/nuxt-link.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/nuxt/src/app/components/nuxt-link.ts b/packages/nuxt/src/app/components/nuxt-link.ts index bb06a0c1d7..c0d8d42417 100644 --- a/packages/nuxt/src/app/components/nuxt-link.ts +++ b/packages/nuxt/src/app/components/nuxt-link.ts @@ -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 - 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 + function resolveTrailingSlashBehavior (to: RouteLocationRaw, resolve: Router['resolve']): RouteLocationRaw | RouteLocation { if (!to || (options.trailingSlash !== 'append' && options.trailingSlash !== 'remove')) { return to }