From: Eduardo San Martin Morote Date: Fri, 3 Jul 2020 06:40:36 +0000 (+0200) Subject: fix(router-link): add missing prop custom in jsx X-Git-Tag: v4.0.0-beta.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6274aeaf5ad4ba4f97c82aad3e1819ef20f5d69;p=thirdparty%2Fvuejs%2Frouter.git fix(router-link): add missing prop custom in jsx --- diff --git a/src/RouterLink.ts b/src/RouterLink.ts index 82d6ac46..c5d3d411 100644 --- a/src/RouterLink.ts +++ b/src/RouterLink.ts @@ -14,13 +14,17 @@ import { routerKey, routeLocationKey } from './injectionSymbols' import { RouteRecord } from './matcher/types' import { assign } from './utils' -export interface RouterLinkProps { +export interface RouterLinkOptions { to: RouteLocationRaw // TODO: refactor using extra options allowed in router.push. Needs RFC replace?: boolean } -type UseLinkOptions = VueUseOptions +export interface RouterLinkProps extends RouterLinkOptions { + custom?: boolean +} + +type UseLinkOptions = VueUseOptions // TODO: we could allow currentRoute as a prop to expose `isActive` and // `isExactActive` behavior should go through an RFC diff --git a/src/history/common.ts b/src/history/common.ts index 3120f62f..2c7c8bc2 100644 --- a/src/history/common.ts +++ b/src/history/common.ts @@ -132,7 +132,7 @@ export interface RouterHistory { /** * Generates the corresponding href to be used in an anchor tag. * - * @param location + * @param location - history location that should create an href */ createHref(location: HistoryLocationNormalized): string diff --git a/test-dts/components.test-d.tsx b/test-dts/components.test-d.tsx index c8f58b01..8ef2cbbe 100644 --- a/test-dts/components.test-d.tsx +++ b/test-dts/components.test-d.tsx @@ -13,9 +13,12 @@ let router = createRouter({ // RouterLink expectError() +expectError() +expectError() expectType() expectType() expectType() +expectType() // RouterView expectType()