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

@ -16,6 +16,8 @@ import {Type, isPresent} from '../../facade/lang';
/**
* Predicates for use with {@link DebugElement}'s query functions.
*
* @experimental All debugging apis are currently experimental.
*/
export class By {
/**

View File

@ -13,5 +13,7 @@ import {OpaqueToken} from '@angular/core';
*
* Note: Document might not be available in the Application Context when Application and Rendering
* Contexts are not the same (e.g. when running the application into a Web Worker).
*
* @stable
*/
export const DOCUMENT: OpaqueToken = new OpaqueToken('DocumentToken');

View File

@ -12,8 +12,14 @@ import {ListWrapper} from '../../facade/collection';
import {BaseException} from '../../facade/exceptions';
/**
* @stable
*/
export const EVENT_MANAGER_PLUGINS: OpaqueToken = new OpaqueToken('EventManagerPlugins');
/**
* @stable
*/
@Injectable()
export class EventManager {
private _plugins: EventManagerPlugin[];

View File

@ -13,6 +13,12 @@ import {isPresent} from '../../facade/lang';
import {HammerGesturesPluginCommon} from './hammer_common';
/**
* A DI token that you can use to provide{@link HammerGestureConfig} to Angular. Use it to configure
* Hammer gestures.
*
* @experimental
*/
export const HAMMER_GESTURE_CONFIG: OpaqueToken = new OpaqueToken('HammerGestureConfig');
export interface HammerInstance {
@ -20,6 +26,9 @@ export interface HammerInstance {
off(eventName: string, callback: Function): void;
}
/**
* @experimental
*/
@Injectable()
export class HammerGestureConfig {
events: string[] = [];

View File

@ -23,6 +23,10 @@ var modifierKeyGetters: {[key: string]: (event: KeyboardEvent) => boolean} = {
'shift': (event: KeyboardEvent) => event.shiftKey
};
/**
* @experimental
*/
@Injectable()
export class KeyEventsPlugin extends EventManagerPlugin {
constructor() { super(); }