From 9fb7bdea89d8275a89f18c9adb19ab222443a463 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 20 Oct 2020 21:35:36 +0200 Subject: [PATCH] fix(router): incorrect signature for createUrlTree (#39347) The type of the `navigationExtras` param was accidetally changed to the wrong symbol in https://github.com/angular/angular/commit/783a5bd7bbae35562e21aaa27771c54091fb9812. These changes revert it to the correct one. PR Close #39347 --- goldens/public-api/router/router.d.ts | 2 +- packages/router/src/router.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/goldens/public-api/router/router.d.ts b/goldens/public-api/router/router.d.ts index 8734cd842a..73cb56deb0 100644 --- a/goldens/public-api/router/router.d.ts +++ b/goldens/public-api/router/router.d.ts @@ -341,7 +341,7 @@ export declare class Router { urlHandlingStrategy: UrlHandlingStrategy; urlUpdateStrategy: 'deferred' | 'eager'; constructor(rootComponentType: Type | null, urlSerializer: UrlSerializer, rootContexts: ChildrenOutletContexts, location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Routes); - createUrlTree(commands: any[], navigationExtras?: NavigationExtras): UrlTree; + createUrlTree(commands: any[], navigationExtras?: UrlCreationOptions): UrlTree; dispose(): void; getCurrentNavigation(): Navigation | null; initialNavigation(): void; diff --git a/packages/router/src/router.ts b/packages/router/src/router.ts index 11d99bbca6..f560d20dcf 100644 --- a/packages/router/src/router.ts +++ b/packages/router/src/router.ts @@ -1096,7 +1096,7 @@ export class Router { * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route}); * ``` */ - createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree { + createUrlTree(commands: any[], navigationExtras: UrlCreationOptions = {}): UrlTree { const {relativeTo, queryParams, fragment, queryParamsHandling, preserveFragment} = navigationExtras; const a = relativeTo || this.routerState.root;