refactor(router): remove RouteEvent base class (#19043)
* Introduced with #18407, `RouteEvents` don't actually have a common constructor. Reverting here to be able to add new functionality to ChildActivation events. PR Close #19043
This commit is contained in:
42
tools/public_api_guard/router/index.d.ts
vendored
42
tools/public_api_guard/router/index.d.ts
vendored
@ -60,12 +60,18 @@ export interface CanLoad {
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class ChildActivationEnd extends RouteEvent {
|
||||
export declare class ChildActivationEnd {
|
||||
route: Route;
|
||||
constructor(
|
||||
route: Route);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class ChildActivationStart extends RouteEvent {
|
||||
export declare class ChildActivationStart {
|
||||
route: Route;
|
||||
constructor(
|
||||
route: Route);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
@ -97,7 +103,7 @@ export declare class DefaultUrlSerializer implements UrlSerializer {
|
||||
export declare type DetachedRouteHandle = {};
|
||||
|
||||
/** @stable */
|
||||
export declare type Event = RouterEvent | RouteEvent;
|
||||
export declare type Event = RouterEvent | RouteConfigLoadStart | RouteConfigLoadEnd | ChildActivationStart | ChildActivationEnd;
|
||||
|
||||
/** @stable */
|
||||
export interface ExtraOptions {
|
||||
@ -284,20 +290,19 @@ export interface Route {
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouteConfigLoadEnd extends RouteEvent {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouteConfigLoadStart extends RouteEvent {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouteEvent {
|
||||
export declare class RouteConfigLoadEnd {
|
||||
route: Route;
|
||||
constructor(
|
||||
route: Route);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouteConfigLoadStart {
|
||||
route: Route;
|
||||
constructor(
|
||||
route: Route);
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
@ -339,6 +344,15 @@ export declare abstract class RouteReuseStrategy {
|
||||
abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouterEvent {
|
||||
id: number;
|
||||
url: string;
|
||||
constructor(
|
||||
id: number,
|
||||
url: string);
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare class RouterLink {
|
||||
fragment: string;
|
||||
|
Reference in New Issue
Block a user