feat(router): add router-level events for GuardsCheck and Resolve (#17601)
This commit is contained in:
60
tools/public_api_guard/router/router.d.ts
vendored
60
tools/public_api_guard/router/router.d.ts
vendored
@ -87,7 +87,7 @@ export declare class DefaultUrlSerializer implements UrlSerializer {
|
||||
export declare type DetachedRouteHandle = {};
|
||||
|
||||
/** @stable */
|
||||
export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError | RoutesRecognized | RouteConfigLoadStart | RouteConfigLoadEnd;
|
||||
export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError | RoutesRecognized | RouteConfigLoadStart | RouteConfigLoadEnd | GuardsCheckStart | GuardsCheckEnd | ResolveStart | ResolveEnd;
|
||||
|
||||
/** @stable */
|
||||
export interface ExtraOptions {
|
||||
@ -98,6 +98,36 @@ export interface ExtraOptions {
|
||||
useHash?: boolean;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class GuardsCheckEnd {
|
||||
id: number;
|
||||
shouldActivate: boolean;
|
||||
state: RouterStateSnapshot;
|
||||
url: string;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot,
|
||||
shouldActivate: boolean);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class GuardsCheckStart {
|
||||
id: number;
|
||||
state: RouterStateSnapshot;
|
||||
url: string;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare type LoadChildren = string | LoadChildrenCallback;
|
||||
|
||||
@ -215,6 +245,34 @@ export declare type ResolveData = {
|
||||
[name: string]: any;
|
||||
};
|
||||
|
||||
/** @experimental */
|
||||
export declare class ResolveEnd {
|
||||
id: number;
|
||||
state: RouterStateSnapshot;
|
||||
url: string;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class ResolveStart {
|
||||
id: number;
|
||||
state: RouterStateSnapshot;
|
||||
url: string;
|
||||
urlAfterRedirects: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string,
|
||||
urlAfterRedirects: string,
|
||||
state: RouterStateSnapshot);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export interface Route {
|
||||
canActivate?: any[];
|
||||
|
Reference in New Issue
Block a user