From: Eduardo San Martin Morote Date: Tue, 17 Sep 2019 14:40:38 +0000 (+0200) Subject: wip: tpm fix for typings X-Git-Tag: v4.0.0-alpha.0~228^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71b365c7bebdc4a0f452ca9f27a70faf2c46cf25;p=thirdparty%2Fvuejs%2Frouter.git wip: tpm fix for typings --- diff --git a/src/router.ts b/src/router.ts index fb5310f9..5fa91392 100644 --- a/src/router.ts +++ b/src/router.ts @@ -135,9 +135,21 @@ export class Router { }) } - resolve(to: RouteLocation, currentLocation?: RouteLocationNormalized/*, append?: boolean */) { - if (typeof to === 'string') return this.resolveLocation(this.history.utils.normalizeLocation(to), currentLocation) - return this.resolveLocation(to) + resolve( + to: RouteLocation, + currentLocation?: RouteLocationNormalized /*, append?: boolean */ + ) { + if (typeof to === 'string') + return this.resolveLocation( + this.history.utils.normalizeLocation(to), + currentLocation + ) + return this.resolveLocation({ + // TODO: refactor with url utils + query: {}, + hash: '', + ...to, + }) } resolveLocation(