fix: public api surface fixes + stability markers
- ts-api-guardian will now error if a new public symbol is added with a stability marker (`@stable`, `@experimental`, `@deprecated`) - DomEventsPlugin and KeyEventsPlugin were removed from public api surface - these classes is an implementation detail - deprecated BROWSER_PROVIDERS was removed completely - `@angular/compiler` was removed from the ts-api-guardian check since this package shouldn't contain anything that users need to directly import - the rest of the api surface was conservatively marked as stable or experimental BREAKING CHANGES: DomEventsPlugin and KeyEventsPlugin previously exported from core are no longer public - these classes are implementation detail. Previously deprecated BROWSER_PROVIDERS was completely removed from platform-browser. Closes #9236 Closes #9235 Ref #9234
This commit is contained in:
28
tools/public_api_guard/router/index.d.ts
vendored
28
tools/public_api_guard/router/index.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
/** @experimental */
|
||||
export declare class ActivatedRoute {
|
||||
component: Type | string;
|
||||
data: Observable<Data>;
|
||||
@ -8,6 +9,7 @@ export declare class ActivatedRoute {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class ActivatedRouteSnapshot {
|
||||
component: Type | string;
|
||||
data: Data;
|
||||
@ -17,29 +19,36 @@ export declare class ActivatedRouteSnapshot {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface CanActivate {
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface CanDeactivate<T> {
|
||||
canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> | boolean;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type Data = {
|
||||
[name: string]: any;
|
||||
};
|
||||
|
||||
/** @experimental */
|
||||
export declare class DefaultUrlSerializer implements UrlSerializer {
|
||||
parse(url: string): UrlTree;
|
||||
serialize(tree: UrlTree): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError;
|
||||
|
||||
/** @experimental */
|
||||
export interface ExtraOptions {
|
||||
enableTracing?: boolean;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NavigationCancel {
|
||||
id: number;
|
||||
url: string;
|
||||
@ -47,6 +56,7 @@ export declare class NavigationCancel {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NavigationEnd {
|
||||
id: number;
|
||||
url: string;
|
||||
@ -55,6 +65,7 @@ export declare class NavigationEnd {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NavigationError {
|
||||
error: any;
|
||||
id: number;
|
||||
@ -63,6 +74,7 @@ export declare class NavigationError {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class NavigationStart {
|
||||
id: number;
|
||||
url: string;
|
||||
@ -70,27 +82,34 @@ export declare class NavigationStart {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type Params = {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
/** @experimental */
|
||||
export declare const PRIMARY_OUTLET: string;
|
||||
|
||||
/** @experimental */
|
||||
export declare function provideRouter(config: RouterConfig, opts?: ExtraOptions): any[];
|
||||
|
||||
/** @experimental */
|
||||
export interface Resolve<T> {
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<any> | any;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare type ResolveData = {
|
||||
[name: string]: any;
|
||||
};
|
||||
|
||||
/** @experimental */
|
||||
export interface Route {
|
||||
path?: string;
|
||||
pathMatch?:
|
||||
/** @deprecated */ terminal?: boolean;
|
||||
|
||||
/** @experimental */
|
||||
export declare class Router {
|
||||
events: Observable<Event>;
|
||||
routerState: RouterState;
|
||||
@ -103,14 +122,18 @@ export declare class Router {
|
||||
serializeUrl(url: UrlTree): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare const ROUTER_DIRECTIVES: (typeof RouterOutlet | typeof RouterLink | typeof RouterLinkActive)[];
|
||||
|
||||
/** @experimental */
|
||||
export declare type RouterConfig = Route[];
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouterOutletMap {
|
||||
registerOutlet(name: string, outlet: RouterOutlet): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouterState extends Tree<ActivatedRoute> {
|
||||
fragment: Observable<string>;
|
||||
queryParams: Observable<Params>;
|
||||
@ -118,6 +141,7 @@ export declare class RouterState extends Tree<ActivatedRoute> {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
|
||||
fragment: string;
|
||||
queryParams: Params;
|
||||
@ -125,6 +149,7 @@ export declare class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class RoutesRecognized {
|
||||
id: number;
|
||||
state: RouterStateSnapshot;
|
||||
@ -134,6 +159,7 @@ export declare class RoutesRecognized {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class UrlPathWithParams {
|
||||
parameters: {
|
||||
[key: string]: string;
|
||||
@ -145,11 +171,13 @@ export declare class UrlPathWithParams {
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare abstract class UrlSerializer {
|
||||
abstract parse(url: string): UrlTree;
|
||||
abstract serialize(tree: UrlTree): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare class UrlTree {
|
||||
fragment: string;
|
||||
queryParams: {
|
||||
|
Reference in New Issue
Block a user