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:
Igor Minar
2016-06-27 12:27:23 -07:00
parent fcfddbf79c
commit 24eb8389d2
102 changed files with 685 additions and 103 deletions

View File

@ -43,6 +43,8 @@ export interface NavigationExtras {
/**
* An event triggered when a navigation starts
*
* @experimental
*/
export class NavigationStart {
constructor(public id: number, public url: string) {}
@ -52,6 +54,8 @@ export class NavigationStart {
/**
* An event triggered when a navigation ends successfully
*
* @experimental
*/
export class NavigationEnd {
constructor(public id: number, public url: string, public urlAfterRedirects: string) {}
@ -63,6 +67,8 @@ export class NavigationEnd {
/**
* An event triggered when a navigation is canceled
*
* @experimental
*/
export class NavigationCancel {
constructor(public id: number, public url: string) {}
@ -72,6 +78,8 @@ export class NavigationCancel {
/**
* An event triggered when a navigation fails due to unexpected error
*
* @experimental
*/
export class NavigationError {
constructor(public id: number, public url: string, public error: any) {}
@ -83,6 +91,8 @@ export class NavigationError {
/**
* An event triggered when routes are recognized
*
* @experimental
*/
export class RoutesRecognized {
constructor(
@ -94,10 +104,15 @@ export class RoutesRecognized {
}
}
/**
* @experimental
*/
export type Event = NavigationStart | NavigationEnd | NavigationCancel | NavigationError;
/**
* The `Router` is responsible for mapping URLs to components.
*
* @experimental
*/
export class Router {
private currentUrlTree: UrlTree;
@ -350,9 +365,16 @@ export class Router {
}
}
/**
* @experimental
*/
class CanActivate {
constructor(public route: ActivatedRouteSnapshot) {}
}
/**
* @experimental
*/
class CanDeactivate {
constructor(public component: Object, public route: ActivatedRouteSnapshot) {}
}