docs: change Navigation from type to interface (#42281)

Navigation type should be interface so it can be documented on aio site.

fixes #37384

PR Close #42281
This commit is contained in:
Andrew Scott 2021-05-24 10:39:22 -07:00 committed by Andrew Kushnir
parent 2b7dc15655
commit 6a2e3e2b2c
2 changed files with 11 additions and 11 deletions

View File

@ -169,15 +169,15 @@ export declare type LoadChildren = LoadChildrenCallback | DeprecatedLoadChildren
export declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Observable<Type<any>> | Promise<NgModuleFactory<any> | Type<any> | any>; export declare type LoadChildrenCallback = () => Type<any> | NgModuleFactory<any> | Observable<Type<any>> | Promise<NgModuleFactory<any> | Type<any> | any>;
export declare type Navigation = { export declare interface Navigation {
extractedUrl: UrlTree;
extras: NavigationExtras;
finalUrl?: UrlTree;
id: number; id: number;
initialUrl: string | UrlTree; initialUrl: string | UrlTree;
extractedUrl: UrlTree;
finalUrl?: UrlTree;
trigger: 'imperative' | 'popstate' | 'hashchange';
extras: NavigationExtras;
previousNavigation: Navigation | null; previousNavigation: Navigation | null;
}; trigger: 'imperative' | 'popstate' | 'hashchange';
}
export declare interface NavigationBehaviorOptions { export declare interface NavigationBehaviorOptions {
replaceUrl?: boolean; replaceUrl?: boolean;

View File

@ -260,7 +260,7 @@ export type RestoredState = {
* *
* @publicApi * @publicApi
*/ */
export type Navigation = { export interface Navigation {
/** /**
* The unique identifier of the current navigation. * The unique identifier of the current navigation.
*/ */
@ -269,7 +269,7 @@ export type Navigation = {
* The target URL passed into the `Router#navigateByUrl()` call before navigation. This is * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is
* the value before the router has parsed or applied redirects to it. * the value before the router has parsed or applied redirects to it.
*/ */
initialUrl: string | UrlTree; initialUrl: string|UrlTree;
/** /**
* The initial target URL after being parsed with `UrlSerializer.extract()`. * The initial target URL after being parsed with `UrlSerializer.extract()`.
*/ */
@ -287,7 +287,7 @@ export type Navigation = {
* * 'popstate'--Triggered by a popstate event. * * 'popstate'--Triggered by a popstate event.
* * 'hashchange'--Triggered by a hashchange event. * * 'hashchange'--Triggered by a hashchange event.
*/ */
trigger: 'imperative' | 'popstate' | 'hashchange'; trigger: 'imperative'|'popstate'|'hashchange';
/** /**
* Options that controlled the strategy used for this navigation. * Options that controlled the strategy used for this navigation.
* See `NavigationExtras`. * See `NavigationExtras`.
@ -298,8 +298,8 @@ export type Navigation = {
* is available, therefore this previous `Navigation` object has a `null` value * is available, therefore this previous `Navigation` object has a `null` value
* for its own `previousNavigation`. * for its own `previousNavigation`.
*/ */
previousNavigation: Navigation | null; previousNavigation: Navigation|null;
}; }
export type NavigationTransition = { export type NavigationTransition = {
id: number, id: number,