diff --git a/gulpfile.js b/gulpfile.js index b8068b9b22..d2deacc209 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -32,8 +32,10 @@ const entrypoints = [ 'dist/packages-dist/core/testing.d.ts', 'dist/packages-dist/common/index.d.ts', 'dist/packages-dist/common/testing.d.ts', - 'dist/packages-dist/compiler/index.d.ts', - 'dist/packages-dist/compiler/testing.d.ts', + // The API surface of the compiler is currently unstable - all of the important APIs are exposed + // via @angular/core, @angular/platform-browser or @angular/platform-browser-dynamic instead. + //'dist/packages-dist/compiler/index.d.ts', + //'dist/packages-dist/compiler/testing.d.ts', 'dist/packages-dist/upgrade/index.d.ts', 'dist/packages-dist/platform-browser/index.d.ts', 'dist/packages-dist/platform-browser/testing.d.ts', @@ -54,7 +56,7 @@ const publicApiArgs = [ '--allowModuleIdentifiers', 'jasmine', '--allowModuleIdentifiers', 'protractor', '--allowModuleIdentifiers', 'angular', - '--onStabilityMissing', 'warn' + '--onStabilityMissing', 'error' ].concat(entrypoints); // Note that these two commands work on built d.ts files instead of the source diff --git a/modules/@angular/common/src/forms-deprecated/directives/validators.ts b/modules/@angular/common/src/forms-deprecated/directives/validators.ts index 0bebe7168e..2ac9dcf5e5 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/validators.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/validators.ts @@ -30,6 +30,8 @@ import {NG_VALIDATORS, Validators} from '../validators'; * } * } * ``` + * + * @experimental */ export interface Validator { validate(c: AbstractControl): {[key: string]: any}; } diff --git a/modules/@angular/common/src/location/platform_location.ts b/modules/@angular/common/src/location/platform_location.ts index 7828def62e..adad468253 100644 --- a/modules/@angular/common/src/location/platform_location.ts +++ b/modules/@angular/common/src/location/platform_location.ts @@ -53,8 +53,11 @@ export abstract class PlatformLocation { /** * A serializable version of the event from onPopState or onHashChange * - * @stable + * @experimental */ export interface UrlChangeEvent { type: string; } +/** + * @experimental + */ export interface UrlChangeListener { (e: UrlChangeEvent): any; } diff --git a/modules/@angular/common/testing/location_mock.ts b/modules/@angular/common/testing/location_mock.ts index f2faa8a51c..831fb12162 100644 --- a/modules/@angular/common/testing/location_mock.ts +++ b/modules/@angular/common/testing/location_mock.ts @@ -15,6 +15,8 @@ import {LocationStrategy} from '../src/location/location_strategy'; /** * A spy for {@link Location} that allows tests to fire simulated location events. + * + * @experimental */ @Injectable() export class SpyLocation implements Location { diff --git a/modules/@angular/core/index.ts b/modules/@angular/core/index.ts index fbb2461d19..7faff82290 100644 --- a/modules/@angular/core/index.ts +++ b/modules/@angular/core/index.ts @@ -9,7 +9,7 @@ /** * @module * @description - * Starting point to import all public core APIs. + * Entry point from which you should import all public core APIs. */ export * from './src/metadata'; export * from './src/util'; diff --git a/modules/@angular/core/private_export.ts b/modules/@angular/core/private_export.ts index 2530dbbbbb..92dd842bb1 100644 --- a/modules/@angular/core/private_export.ts +++ b/modules/@angular/core/private_export.ts @@ -75,10 +75,10 @@ export declare namespace __core_private_types__ { export var ValueUnwrapper: typeof change_detection_util.ValueUnwrapper; export type RenderDebugInfo = api.RenderDebugInfo; export var RenderDebugInfo: typeof api.RenderDebugInfo; - export var SecurityContext: typeof security.SecurityContext; export type SecurityContext = security.SecurityContext; - export var SanitizationService: typeof security.SanitizationService; + export var SecurityContext: typeof security.SecurityContext; export type SanitizationService = security.SanitizationService; + export var SanitizationService: typeof security.SanitizationService; export type TemplateRef_ = template_ref.TemplateRef_; export var TemplateRef_: typeof template_ref.TemplateRef_; export var wtfInit: typeof wtf_init.wtfInit; diff --git a/modules/@angular/core/src/animation/animation_player.ts b/modules/@angular/core/src/animation/animation_player.ts index a8e07841c9..9aad73a0e2 100644 --- a/modules/@angular/core/src/animation/animation_player.ts +++ b/modules/@angular/core/src/animation/animation_player.ts @@ -9,6 +9,10 @@ import {BaseException} from '../facade/exceptions'; import {scheduleMicroTask} from '../facade/lang'; + +/** + * @experimental Animation support is experimental. + */ export abstract class AnimationPlayer { abstract onDone(fn: Function): void; abstract play(): void; diff --git a/modules/@angular/core/src/animation/metadata.ts b/modules/@angular/core/src/animation/metadata.ts index 4c269c14cc..f7d85a89a5 100644 --- a/modules/@angular/core/src/animation/metadata.ts +++ b/modules/@angular/core/src/animation/metadata.ts @@ -7,25 +7,35 @@ */ import {BaseException} from '../facade/exceptions'; -import {NumberWrapper, isArray, isPresent, isString, isStringMap} from '../facade/lang'; +import {NumberWrapper, isArray, isPresent, isString} from '../facade/lang'; +/** + * @experimental Animation support is experimental. + */ export const AUTO_STYLE = '*'; /** * Metadata representing the entry of animations. * Instances of this class are provided via the animation DSL when the {@link trigger trigger * animation function} is called. + * + * @experimental Animation support is experimental. */ export class AnimationEntryMetadata { constructor(public name: string, public definitions: AnimationStateMetadata[]) {} } +/** + * @experimental Animation support is experimental. + */ export abstract class AnimationStateMetadata {} /** * Metadata representing the entry of animations. * Instances of this class are provided via the animation DSL when the {@link state state animation * function} is called. + * + * @experimental Animation support is experimental. */ export class AnimationStateDeclarationMetadata extends AnimationStateMetadata { constructor(public stateNameExpr: string, public styles: AnimationStyleMetadata) { super(); } @@ -35,17 +45,24 @@ export class AnimationStateDeclarationMetadata extends AnimationStateMetadata { * Metadata representing the entry of animations. * Instances of this class are provided via the animation DSL when the * {@link transition transition animation function} is called. + * + * @experimental Animation support is experimental. */ export class AnimationStateTransitionMetadata extends AnimationStateMetadata { constructor(public stateChangeExpr: string, public steps: AnimationMetadata) { super(); } } +/** + * @experimental Animation support is experimental. + */ export abstract class AnimationMetadata {} /** * Metadata representing the entry of animations. * Instances of this class are provided via the animation DSL when the {@link keyframes keyframes * animation function} is called. + * + * @experimental Animation support is experimental. */ export class AnimationKeyframesSequenceMetadata extends AnimationMetadata { constructor(public steps: AnimationStyleMetadata[]) { super(); } @@ -55,6 +72,8 @@ export class AnimationKeyframesSequenceMetadata extends AnimationMetadata { * Metadata representing the entry of animations. * Instances of this class are provided via the animation DSL when the {@link style style animation * function} is called. + * + * @experimental Animation support is experimental. */ export class AnimationStyleMetadata extends AnimationMetadata { constructor( @@ -67,6 +86,8 @@ export class AnimationStyleMetadata extends AnimationMetadata { * Metadata representing the entry of animations. * Instances of this class are provided via the animation DSL when the {@link animate animate * animation function} is called. + * + * @experimental Animation support is experimental. */ export class AnimationAnimateMetadata extends AnimationMetadata { constructor( @@ -76,6 +97,9 @@ export class AnimationAnimateMetadata extends AnimationMetadata { } } +/** + * @experimental Animation support is experimental. + */ export abstract class AnimationWithStepsMetadata extends AnimationMetadata { constructor() { super(); } get steps(): AnimationMetadata[] { throw new BaseException('NOT IMPLEMENTED: Base Class'); } @@ -85,6 +109,8 @@ export abstract class AnimationWithStepsMetadata extends AnimationMetadata { * Metadata representing the entry of animations. * Instances of this class are provided via the animation DSL when the {@link sequence sequence * animation function} is called. + * + * @experimental Animation support is experimental. */ export class AnimationSequenceMetadata extends AnimationWithStepsMetadata { constructor(private _steps: AnimationMetadata[]) { super(); } @@ -95,6 +121,8 @@ export class AnimationSequenceMetadata extends AnimationWithStepsMetadata { * Metadata representing the entry of animations. * Instances of this class are provided via the animation DSL when the {@link group group animation * function} is called. + * + * @experimental Animation support is experimental. */ export class AnimationGroupMetadata extends AnimationWithStepsMetadata { constructor(private _steps: AnimationMetadata[]) { super(); } @@ -150,6 +178,8 @@ export class AnimationGroupMetadata extends AnimationWithStepsMetadata { * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) * * {@example core/animation/ts/dsl/animation_example.ts region='Component'} + * + * @experimental Animation support is experimental. */ export function animate( timing: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata = @@ -197,6 +227,8 @@ export function animate( * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) * * {@example core/animation/ts/dsl/animation_example.ts region='Component'} + * + * @experimental Animation support is experimental. */ export function group(steps: AnimationMetadata[]): AnimationGroupMetadata { return new AnimationGroupMetadata(steps); @@ -238,6 +270,8 @@ export function group(steps: AnimationMetadata[]): AnimationGroupMetadata { * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) * * {@example core/animation/ts/dsl/animation_example.ts region='Component'} + * + * @experimental Animation support is experimental. */ export function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata { return new AnimationSequenceMetadata(steps); @@ -287,6 +321,8 @@ export function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) * * {@example core/animation/ts/dsl/animation_example.ts region='Component'} + * + * @experimental Animation support is experimental. */ export function style( tokens: string | {[key: string]: string | number} | @@ -362,6 +398,8 @@ export function style( * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) * * {@example core/animation/ts/dsl/animation_example.ts region='Component'} + * + * @experimental Animation support is experimental. */ export function state( stateNameExpr: string, styles: AnimationStyleMetadata): AnimationStateDeclarationMetadata { @@ -414,6 +452,8 @@ export function state( * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) * * {@example core/animation/ts/dsl/animation_example.ts region='Component'} + * + * @experimental Animation support is experimental. */ export function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata { return new AnimationKeyframesSequenceMetadata(steps); @@ -504,6 +544,8 @@ export function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSe * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) * * {@example core/animation/ts/dsl/animation_example.ts region='Component'} + * + * @experimental Animation support is experimental. */ export function transition(stateChangeExpr: string, steps: AnimationMetadata | AnimationMetadata[]): AnimationStateTransitionMetadata { @@ -565,6 +607,8 @@ export function transition(stateChangeExpr: string, steps: AnimationMetadata | A * ### Example ([live demo](http://plnkr.co/edit/Kez8XGWBxWue7qP7nNvF?p=preview)) * * {@example core/animation/ts/dsl/animation_example.ts region='Component'} + * + * @experimental Animation support is experimental. */ export function trigger(name: string, animation: AnimationMetadata[]): AnimationEntryMetadata { return new AnimationEntryMetadata(name, animation); diff --git a/modules/@angular/core/src/application_ref.ts b/modules/@angular/core/src/application_ref.ts index 7fbebcfb78..35cf23aba5 100644 --- a/modules/@angular/core/src/application_ref.ts +++ b/modules/@angular/core/src/application_ref.ts @@ -41,7 +41,8 @@ var _inPlatformCreate: boolean = false; * One important assertion this disables verifies that a change detection pass * does not result in additional changes to any bindings (also known as * unidirectional data flow). - * @stable + * + * @experimental APIs related to application bootstrap are currently under review. */ export function enableProdMode(): void { if (_runModeLocked) { @@ -56,6 +57,8 @@ export function enableProdMode(): void { * This can only be read after `lockRunMode` has been called. * * By default, this is true, unless a user calls `enableProdMode`. + * + * @experimental APIs related to application bootstrap are currently under review. */ export function isDevMode(): boolean { if (!_runModeLocked) { @@ -68,6 +71,8 @@ export function isDevMode(): boolean { * Locks the run mode of Angular. After this has been called, * it can't be changed any more. I.e. `isDevMode()` will always * return the same value. + * + * @experimental APIs related to application bootstrap are currently under review. */ export function lockRunMode(): void { _runModeLocked = true; @@ -76,7 +81,8 @@ export function lockRunMode(): void { /** * Creates a platform. * Platforms have to be eagerly created via this function. - * @experimental + * + * @experimental APIs related to application bootstrap are currently under review. */ export function createPlatform(injector: Injector): PlatformRef { if (_inPlatformCreate) { @@ -99,7 +105,8 @@ export function createPlatform(injector: Injector): PlatformRef { /** * Checks that there currently is a platform * which contains the given token as a provider. - * @experimental + * + * @experimental APIs related to application bootstrap are currently under review. */ export function assertPlatform(requiredToken: any): PlatformRef { var platform = getPlatform(); @@ -115,7 +122,8 @@ export function assertPlatform(requiredToken: any): PlatformRef { /** * Dispose the existing platform. - * @experimental + * + * @experimental APIs related to application bootstrap are currently under review. */ export function disposePlatform(): void { if (isPresent(_platform) && !_platform.disposed) { @@ -125,7 +133,8 @@ export function disposePlatform(): void { /** * Returns the current platform. - * @experimental + * + * @experimental APIs related to application bootstrap are currently under review. */ export function getPlatform(): PlatformRef { return isPresent(_platform) && !_platform.disposed ? _platform : null; @@ -134,7 +143,8 @@ export function getPlatform(): PlatformRef { /** * Shortcut for ApplicationRef.bootstrap. * Requires a platform to be created first. - * @experimental + * + * @experimental APIs related to application bootstrap are currently under review. */ export function coreBootstrap( componentFactory: ComponentFactory, injector: Injector): ComponentRef { @@ -146,7 +156,8 @@ export function coreBootstrap( * Resolves the componentFactory for the given component, * waits for asynchronous initializers and bootstraps the component. * Requires a platform to be created first. - * @experimental + * + * @experimental APIs related to application bootstrap are currently under review. */ export function coreLoadAndBootstrap( componentType: Type, injector: Injector): Promise> { @@ -166,7 +177,8 @@ export function coreLoadAndBootstrap( * * A page's platform is initialized implicitly when {@link bootstrap}() is called, or * explicitly by calling {@link createPlatform}(). - * @stable + * + * @experimental APIs related to application bootstrap are currently under review. */ export abstract class PlatformRef { /** @@ -228,7 +240,8 @@ export class PlatformRef_ extends PlatformRef { * A reference to an Angular application running on a page. * * For more about Angular applications, see the documentation for {@link bootstrap}. - * @stable + * + * @experimental APIs related to application bootstrap are currently under review. */ export abstract class ApplicationRef { /** diff --git a/modules/@angular/core/src/change_detection/differs/iterable_differs.ts b/modules/@angular/core/src/change_detection/differs/iterable_differs.ts index c4104bc710..e17b87a55d 100644 --- a/modules/@angular/core/src/change_detection/differs/iterable_differs.ts +++ b/modules/@angular/core/src/change_detection/differs/iterable_differs.ts @@ -25,14 +25,18 @@ export interface IterableDiffer { } /** - * An optional function passed into {@link NgFor} that defines how to track - * items in an iterable (e.g. by index or id) + * An optional function passed into {@link NgFor} that defines how to track + * items in an iterable (e.g. by index or id) + * + * @stable */ export interface TrackByFn { (index: number, item: any): any; } /** * Provides a factory for {@link IterableDiffer}. + * + * @stable */ export interface IterableDifferFactory { supports(objects: any): boolean; diff --git a/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts b/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts index ddd4253239..17a414296c 100644 --- a/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts +++ b/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts @@ -15,6 +15,8 @@ import {ChangeDetectorRef} from '../change_detector_ref'; /** * A differ that tracks changes made to an object over time. + * + * @stable */ export interface KeyValueDiffer { diff(object: any): any /** TODO #9100 */; @@ -23,6 +25,8 @@ export interface KeyValueDiffer { /** * Provides a factory for {@link KeyValueDiffer}. + * + * @stable */ export interface KeyValueDifferFactory { supports(objects: any): boolean; diff --git a/modules/@angular/core/src/change_detection/pipe_transform.ts b/modules/@angular/core/src/change_detection/pipe_transform.ts index 7556ed1f72..d5a4605ed4 100644 --- a/modules/@angular/core/src/change_detection/pipe_transform.ts +++ b/modules/@angular/core/src/change_detection/pipe_transform.ts @@ -33,5 +33,6 @@ * * Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`. * + * @stable */ export interface PipeTransform { transform(value: any, ...args: any[]): any; } diff --git a/modules/@angular/core/src/debug/debug_node.ts b/modules/@angular/core/src/debug/debug_node.ts index 3a9ad35905..418c8e6b78 100644 --- a/modules/@angular/core/src/debug/debug_node.ts +++ b/modules/@angular/core/src/debug/debug_node.ts @@ -14,7 +14,7 @@ import {RenderDebugInfo} from '../render/api'; export class EventListener { constructor(public name: string, public callback: Function){}; } /** - * @experimental + * @experimental All debugging apis are currently experimental. */ export class DebugNode { nativeNode: any; @@ -58,7 +58,7 @@ export class DebugNode { } /** - * @experimental + * @experimental All debugging apis are currently experimental. */ export class DebugElement extends DebugNode { name: string; diff --git a/modules/@angular/core/src/di/forward_ref.ts b/modules/@angular/core/src/di/forward_ref.ts index e3a75b5f91..39be2adc14 100644 --- a/modules/@angular/core/src/di/forward_ref.ts +++ b/modules/@angular/core/src/di/forward_ref.ts @@ -15,6 +15,7 @@ import {Type, isFunction, stringify} from '../facade/lang'; * ### Example * * {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref_fn'} + * @experimental */ export interface ForwardRefFn { (): any; } diff --git a/modules/@angular/core/src/di/reflective_injector.ts b/modules/@angular/core/src/di/reflective_injector.ts index 36f504cbc5..be5eed746b 100644 --- a/modules/@angular/core/src/di/reflective_injector.ts +++ b/modules/@angular/core/src/di/reflective_injector.ts @@ -355,6 +355,8 @@ export class ReflectiveInjectorDynamicStrategy implements ReflectiveInjectorStra * * Notice, we don't use the `new` operator because we explicitly want to have the `Injector` * resolve all of the object's dependencies automatically. + * + * @stable */ export abstract class ReflectiveInjector implements Injector { /** diff --git a/modules/@angular/core/src/di/reflective_provider.ts b/modules/@angular/core/src/di/reflective_provider.ts index 80feaeb6e5..3180549635 100644 --- a/modules/@angular/core/src/di/reflective_provider.ts +++ b/modules/@angular/core/src/di/reflective_provider.ts @@ -47,6 +47,8 @@ const _EMPTY_LIST: any[] /** TODO #9100 */ = /*@ts2dart_const*/[]; * * expect(injector.get('message')).toEqual('Hello'); * ``` + * + * @experimental */ export interface ResolvedReflectiveProvider { /** diff --git a/modules/@angular/core/src/linker/component_factory.ts b/modules/@angular/core/src/linker/component_factory.ts index 40806fc150..83841df95d 100644 --- a/modules/@angular/core/src/linker/component_factory.ts +++ b/modules/@angular/core/src/linker/component_factory.ts @@ -86,6 +86,10 @@ export class ComponentRef_ extends ComponentRef { * @ts2dart_const */ const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object(); + +/** + * @stable + */ export class ComponentFactory { constructor( public selector: string, private _viewFactory: Function, private _componentType: Type) {} diff --git a/modules/@angular/core/src/linker/component_factory_resolver.ts b/modules/@angular/core/src/linker/component_factory_resolver.ts index 3de1854ea7..969f1786ed 100644 --- a/modules/@angular/core/src/linker/component_factory_resolver.ts +++ b/modules/@angular/core/src/linker/component_factory_resolver.ts @@ -12,6 +12,10 @@ import {ClassWithConstructor, stringify} from '../facade/lang'; import {ComponentFactory} from './component_factory'; + +/** + * @stable + */ export class NoComponentFactoryError extends BaseException { constructor(public component: Function) { super(`No component factory found for ${stringify(component)}`); @@ -24,6 +28,9 @@ class _NullComponentFactoryResolver implements ComponentFactoryResolver { } } +/** + * @stable + */ export abstract class ComponentFactoryResolver { static NULL: ComponentFactoryResolver = new _NullComponentFactoryResolver(); abstract resolveComponentFactory(component: ClassWithConstructor): ComponentFactory; diff --git a/modules/@angular/core/src/linker/element_ref.ts b/modules/@angular/core/src/linker/element_ref.ts index 3f2e6f1b13..85b31005b3 100644 --- a/modules/@angular/core/src/linker/element_ref.ts +++ b/modules/@angular/core/src/linker/element_ref.ts @@ -11,6 +11,8 @@ * * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM * element. + * + * @stable */ // Note: We don't expose things like `Injector`, `ViewContainer`, ... here, // i.e. users have to ask for what they need. With that, we can build better analysis tools diff --git a/modules/@angular/core/src/metadata.ts b/modules/@angular/core/src/metadata.ts index 46c59699f1..3277e01f1e 100644 --- a/modules/@angular/core/src/metadata.ts +++ b/modules/@angular/core/src/metadata.ts @@ -30,6 +30,8 @@ import {Type} from '../src/facade/lang'; * Interface for the {@link DirectiveMetadata} decorator function. * * See {@link DirectiveFactory}. + * + * @stable */ export interface DirectiveDecorator extends TypeDecorator {} @@ -37,6 +39,8 @@ export interface DirectiveDecorator extends TypeDecorator {} * Interface for the {@link ComponentMetadata} decorator function. * * See {@link ComponentFactory}. + * + * @stable */ export interface ComponentDecorator extends TypeDecorator { /** @@ -59,6 +63,8 @@ export interface ComponentDecorator extends TypeDecorator { * Interface for the {@link ViewMetadata} decorator function. * * See {@link ViewFactory}. + * + * @experimental */ export interface ViewDecorator extends TypeDecorator { /** @@ -107,6 +113,8 @@ export interface ViewDecorator extends TypeDecorator { * new ng.Directive({...}) * ] * ``` + * + * @stable */ export interface DirectiveMetadataFactory { (obj: { @@ -163,6 +171,8 @@ export interface DirectiveMetadataFactory { * new ng.Component({...}) * ] * ``` + * + * @stable */ export interface ComponentMetadataFactory { (obj: { @@ -256,6 +266,8 @@ export interface ComponentMetadataFactory { * new ng.View({...}) * ] * ``` + * + * @experimental You should most likely use ComponentMetadataFactory instead */ export interface ViewMetadataFactory { (obj: { @@ -315,6 +327,8 @@ export interface ViewMetadataFactory { * [new ng.Attribute('title')] * ] * ``` + * + * @stable */ export interface AttributeMetadataFactory { (name: string): TypeDecorator; diff --git a/modules/@angular/core/src/metadata/view.ts b/modules/@angular/core/src/metadata/view.ts index 2ece32977a..4747945c74 100644 --- a/modules/@angular/core/src/metadata/view.ts +++ b/modules/@angular/core/src/metadata/view.ts @@ -72,6 +72,8 @@ export var VIEW_ENCAPSULATION_VALUES = * } * ``` * @ts2dart_const + * + * @experimental You should most likely be using ComponentMetadata instead. */ export class ViewMetadata { /** diff --git a/modules/@angular/core/src/profile/wtf_impl.ts b/modules/@angular/core/src/profile/wtf_impl.ts index 4544e19ca2..9e1b200dbc 100644 --- a/modules/@angular/core/src/profile/wtf_impl.ts +++ b/modules/@angular/core/src/profile/wtf_impl.ts @@ -10,6 +10,8 @@ import {global} from '../facade/lang'; /** * A scope function for the Web Tracing Framework (WTF). + * + * @experimental */ export interface WtfScopeFn { (arg0?: any, arg1?: any): any; } diff --git a/modules/@angular/core/src/security.ts b/modules/@angular/core/src/security.ts index f075f15f84..8b1b94988b 100644 --- a/modules/@angular/core/src/security.ts +++ b/modules/@angular/core/src/security.ts @@ -12,6 +12,8 @@ * handled. * * See DomSanitizationService for more details on security in Angular applications. + * + * @stable */ export enum SecurityContext { NONE, @@ -25,6 +27,8 @@ export enum SecurityContext { /** * SanitizationService is used by the views to sanitize potentially dangerous values. This is a * private API, use code should only refer to DomSanitizationService. + * + * @stable */ export abstract class SanitizationService { abstract sanitize(context: SecurityContext, value: string): string; diff --git a/modules/@angular/core/src/testability/testability.ts b/modules/@angular/core/src/testability/testability.ts index ed85eaa9d2..737dc9896b 100644 --- a/modules/@angular/core/src/testability/testability.ts +++ b/modules/@angular/core/src/testability/testability.ts @@ -138,6 +138,9 @@ export class TestabilityRegistry { /** * Adapter interface for retrieving the `Testability` service associated for a * particular context. + * + * @experimental Testability apis are primarily intended to be used by e2e test tool vendors like + * the Protractor team. */ export interface GetTestability { addToWindow(registry: TestabilityRegistry): void; diff --git a/modules/@angular/core/src/util/decorators.ts b/modules/@angular/core/src/util/decorators.ts index 3fc1b16227..ad9d7a0fa3 100644 --- a/modules/@angular/core/src/util/decorators.ts +++ b/modules/@angular/core/src/util/decorators.ts @@ -12,6 +12,8 @@ var _nextClassId = 0; /** * Declares the interface to be used with {@link Class}. + * + * @stable */ export interface ClassDefinition { /** @@ -58,6 +60,7 @@ export interface ClassDefinition { * @ng.View({...}) * class MyClass {...} * ``` + * @stable */ export interface TypeDecorator { /** diff --git a/modules/@angular/core/test/linker/security_integration_spec.ts b/modules/@angular/core/test/linker/security_integration_spec.ts index e91b18164f..e8cf109250 100644 --- a/modules/@angular/core/test/linker/security_integration_spec.ts +++ b/modules/@angular/core/test/linker/security_integration_spec.ts @@ -15,8 +15,8 @@ import {CompilerConfig} from '@angular/compiler'; import {Component, ViewMetadata} from '@angular/core/src/metadata'; import {IS_DART} from '../../src/facade/lang'; import {el} from '@angular/platform-browser/testing/browser_util'; +import {DomSanitizationService} from '@angular/platform-browser/src/security/dom_sanitization_service'; -import {DomSanitizationService} from '@angular/platform-browser'; const ANCHOR_ELEMENT = /*@ts2dart_const*/ new OpaqueToken('AnchorElement'); diff --git a/modules/@angular/core/testing/async.ts b/modules/@angular/core/testing/async.ts index 5b60481412..9b6cd960eb 100644 --- a/modules/@angular/core/testing/async.ts +++ b/modules/@angular/core/testing/async.ts @@ -24,6 +24,8 @@ var _global = (typeof window === 'undefined' ? global : window); * }) * }); * ``` + * + * @stable */ export function async(fn: Function): (done: any) => any { // If we're running using the Jasmine test framework, adapt to call the 'done' diff --git a/modules/@angular/core/testing/component_fixture.ts b/modules/@angular/core/testing/component_fixture.ts index b772a8816e..23b9ad5af7 100644 --- a/modules/@angular/core/testing/component_fixture.ts +++ b/modules/@angular/core/testing/component_fixture.ts @@ -16,6 +16,8 @@ import {tick} from './fake_async'; /** * Fixture for debugging and testing a component. + * + * @stable */ export class ComponentFixture { /** diff --git a/modules/@angular/core/testing/fake_async.ts b/modules/@angular/core/testing/fake_async.ts index 95db994ba3..1ab8aa29fe 100644 --- a/modules/@angular/core/testing/fake_async.ts +++ b/modules/@angular/core/testing/fake_async.ts @@ -25,6 +25,8 @@ let _FakeAsyncTestZoneSpecType = (Zone as any /** TODO #9100 */)['FakeAsyncTestZ * * @param fn * @returns {Function} The function wrapped to be executed in the fakeAsync zone + * + * @experimental */ export function fakeAsync(fn: Function): (...args: any[]) => any { if (Zone.current.get('FakeAsyncTestZoneSpec') != null) { @@ -73,6 +75,7 @@ function _getFakeAsyncZoneSpec(): any { * * {@example testing/ts/fake_async.ts region='basic'} * + * @experimental */ export function tick(millis: number = 0): void { _getFakeAsyncZoneSpec().tick(millis); @@ -80,6 +83,8 @@ export function tick(millis: number = 0): void { /** * Discard all remaining periodic tasks. + * + * @experimental */ export function discardPeriodicTasks(): void { let zoneSpec = _getFakeAsyncZoneSpec(); @@ -89,6 +94,8 @@ export function discardPeriodicTasks(): void { /** * Flush any pending microtasks. + * + * @experimental */ export function flushMicrotasks(): void { _getFakeAsyncZoneSpec().flushMicrotasks(); diff --git a/modules/@angular/core/testing/test_component_builder.ts b/modules/@angular/core/testing/test_component_builder.ts index d5d9caae16..a28ec3770c 100644 --- a/modules/@angular/core/testing/test_component_builder.ts +++ b/modules/@angular/core/testing/test_component_builder.ts @@ -16,18 +16,28 @@ import {tick} from './fake_async'; /** * An abstract class for inserting the root test component element in a platform independent way. + * + * @experimental */ export class TestComponentRenderer { insertRootElement(rootElementId: string) {} } +/** + * @experimental + */ export var ComponentFixtureAutoDetect = new OpaqueToken('ComponentFixtureAutoDetect'); + +/** + * @experimental + */ export var ComponentFixtureNoNgZone = new OpaqueToken('ComponentFixtureNoNgZone'); var _nextRootElementId = 0; /** * Builds a ComponentFixture for use in component level tests. + * @stable */ @Injectable() export class TestComponentBuilder { diff --git a/modules/@angular/core/testing/test_injector.ts b/modules/@angular/core/testing/test_injector.ts index 3006526ab5..52b26ad602 100644 --- a/modules/@angular/core/testing/test_injector.ts +++ b/modules/@angular/core/testing/test_injector.ts @@ -13,6 +13,9 @@ import {BaseException} from '../src/facade/exceptions'; import {FunctionWrapper, isPresent} from '../src/facade/lang'; import {AsyncTestCompleter} from './async_test_completer'; +/** + * @experimental + */ export class TestInjector { private _instantiated: boolean = false; @@ -64,6 +67,9 @@ export class TestInjector { var _testInjector: TestInjector = null; +/** + * @experimental + */ export function getTestInjector() { if (_testInjector == null) { _testInjector = new TestInjector(); @@ -81,6 +87,8 @@ export function getTestInjector() { * * Test Providers for individual platforms are available from * 'angular2/platform/testing/'. + * + * @experimental */ export function setBaseTestProviders( platformProviders: Array, @@ -101,6 +109,8 @@ export function setBaseTestProviders( /** * Reset the providers for the test injector. + * + * @experimental */ export function resetBaseTestProviders() { var testInjector = getTestInjector(); @@ -131,6 +141,7 @@ export function resetBaseTestProviders() { * eventually * becomes `it('...', @Inject (object: AClass, async: AsyncTestCompleter) => { ... });` * + * @stable */ export function inject(tokens: any[], fn: Function): () => any { let testInjector = getTestInjector(); @@ -148,6 +159,9 @@ export function inject(tokens: any[], fn: Function): () => any { } } +/** + * @experimental + */ export class InjectSetupWrapper { constructor(private _providers: () => any) {} @@ -166,6 +180,9 @@ export class InjectSetupWrapper { } } +/** + * @experimental + */ export function withProviders(providers: () => any) { return new InjectSetupWrapper(providers); } diff --git a/modules/@angular/core/testing/testing.ts b/modules/@angular/core/testing/testing.ts index 4cc02512da..da692aa1ec 100644 --- a/modules/@angular/core/testing/testing.ts +++ b/modules/@angular/core/testing/testing.ts @@ -117,6 +117,8 @@ if (_global.beforeEach) { /** * Allows overriding default providers of the test injector, * which are defined in test_injector.js + * + * @stable */ export function addProviders(providers: Array): void { if (!providers) return; diff --git a/modules/@angular/examples/platform-browser/dom/debug/ts/debug_element_view_listener/providers.ts b/modules/@angular/examples/platform-browser/dom/debug/ts/debug_element_view_listener/providers.ts index 9ec4a25ca6..569d04427e 100644 --- a/modules/@angular/examples/platform-browser/dom/debug/ts/debug_element_view_listener/providers.ts +++ b/modules/@angular/examples/platform-browser/dom/debug/ts/debug_element_view_listener/providers.ts @@ -7,7 +7,6 @@ */ import {Component} from '@angular/core'; -import {ELEMENT_PROBE_PROVIDERS} from '@angular/platform-browser'; import {bootstrap} from '@angular/platform-browser-dynamic'; @Component({selector: 'my-component'}) @@ -15,5 +14,5 @@ class MyAppComponent { } // #docregion providers -bootstrap(MyAppComponent, [ELEMENT_PROBE_PROVIDERS]); +bootstrap(MyAppComponent); // #enddocregion diff --git a/modules/@angular/facade/src/lang.ts b/modules/@angular/facade/src/lang.ts index 9af485edfb..f284253c74 100644 --- a/modules/@angular/facade/src/lang.ts +++ b/modules/@angular/facade/src/lang.ts @@ -59,6 +59,9 @@ var _global: BrowserNodeGlobal = globalScope; export {_global as global}; +/** + * @stable + */ export var Type = Function; /** @@ -66,6 +69,8 @@ export var Type = Function; * * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is be represented by * the `MyCustomComponent` constructor function. + * + * @stable */ export interface Type extends Function {} diff --git a/modules/@angular/forms/src/directives.ts b/modules/@angular/forms/src/directives.ts index 150c7b93ce..3528f71c0f 100644 --- a/modules/@angular/forms/src/directives.ts +++ b/modules/@angular/forms/src/directives.ts @@ -73,7 +73,10 @@ export const FORM_DIRECTIVES: Type[] = /*@ts2dart_const*/[ RequiredValidator, MinLengthValidator, MaxLengthValidator, PatternValidator ]; +/** + * @experimental + */ export const REACTIVE_FORM_DIRECTIVES: Type[] = /*@ts2dart_const*/[ FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName - ]; \ No newline at end of file + ]; diff --git a/modules/@angular/forms/src/directives/validators.ts b/modules/@angular/forms/src/directives/validators.ts index f079faf703..d9766c90a1 100644 --- a/modules/@angular/forms/src/directives/validators.ts +++ b/modules/@angular/forms/src/directives/validators.ts @@ -30,6 +30,8 @@ import {NG_VALIDATORS, Validators} from '../validators'; * } * } * ``` + * + * @experimental */ export interface Validator { validate(c: AbstractControl): {[key: string]: any}; } @@ -60,7 +62,14 @@ export const REQUIRED_VALIDATOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider*/ export class RequiredValidator { } +/** + * @experimental + */ export interface ValidatorFn { (c: AbstractControl): {[key: string]: any}; } + +/** + * @experimental + */ export interface AsyncValidatorFn { (c: AbstractControl): any /*Promise<{[key: string]: any}>|Observable<{[key: string]: any}>*/; } diff --git a/modules/@angular/forms/src/form_providers.ts b/modules/@angular/forms/src/form_providers.ts index 01b7ecee2c..c673c7c8ac 100644 --- a/modules/@angular/forms/src/form_providers.ts +++ b/modules/@angular/forms/src/form_providers.ts @@ -18,7 +18,7 @@ import {FormBuilder as NewFormBuilder} from './form_builder'; -/* +/** * Shorthand set of providers used for building Angular forms. * * ### Example @@ -43,6 +43,10 @@ function flatten(platformDirectives: any[]): any[] { return flattenedDirectives; } + +/** + * @experimental + */ export function disableDeprecatedForms(): any[] { return [{ provide: CompilerConfig, @@ -55,6 +59,9 @@ export function disableDeprecatedForms(): any[] { }]; } +/** + * @experimental + */ export function provideForms(): any[] { return [ {provide: PLATFORM_DIRECTIVES, useValue: NEW_FORM_DIRECTIVES, multi: true}, FORM_PROVIDERS diff --git a/modules/@angular/http/http.ts b/modules/@angular/http/http.ts index cf6f6a85e2..762ef343d7 100644 --- a/modules/@angular/http/http.ts +++ b/modules/@angular/http/http.ts @@ -179,6 +179,8 @@ export {URLSearchParams} from './src/url_search_params'; * useValue: new CookieXSRFStrategy('MY-XSRF-COOKIE-NAME', 'X-MY-XSRF-HEADER-NAME')}]) * .catch(err => console.error(err)); * ``` + * + * @experimental */ export const HTTP_PROVIDERS: any[] = [ // TODO(pascal): use factory type annotations once supported in DI @@ -191,6 +193,10 @@ export const HTTP_PROVIDERS: any[] = [ {provide: XSRFStrategy, useValue: new CookieXSRFStrategy()}, ]; + +/** + * @experimental + */ export function httpFactory(xhrBackend: XHRBackend, requestOptions: RequestOptions): Http { return new Http(xhrBackend, requestOptions); } @@ -308,6 +314,8 @@ export const HTTP_BINDINGS = HTTP_PROVIDERS; * } * }); * ``` + * + * @experimental */ export const JSONP_PROVIDERS: any[] = [ // TODO(pascal): use factory type annotations once supported in DI diff --git a/modules/@angular/http/src/backends/browser_xhr.ts b/modules/@angular/http/src/backends/browser_xhr.ts index fcfa7290d9..51867d1280 100644 --- a/modules/@angular/http/src/backends/browser_xhr.ts +++ b/modules/@angular/http/src/backends/browser_xhr.ts @@ -12,6 +12,8 @@ import {Injectable} from '@angular/core'; * A backend for http that uses the `XMLHttpRequest` browser API. * * Take care not to evaluate this in non-browser contexts. + * + * @experimental */ @Injectable() export class BrowserXhr { diff --git a/modules/@angular/http/src/backends/jsonp_backend.ts b/modules/@angular/http/src/backends/jsonp_backend.ts index f209cb9de7..69fc62d0e5 100644 --- a/modules/@angular/http/src/backends/jsonp_backend.ts +++ b/modules/@angular/http/src/backends/jsonp_backend.ts @@ -25,6 +25,8 @@ const JSONP_ERR_WRONG_METHOD = 'JSONP requests must use GET request method.'; /** * Abstract base class for an in-flight JSONP request. + * + * @experimental */ export abstract class JSONPConnection implements Connection { /** @@ -143,6 +145,8 @@ export class JSONPConnection_ extends JSONPConnection { /** * A {@link ConnectionBackend} that uses the JSONP strategy of making requests. + * + * @experimental */ export abstract class JSONPBackend extends ConnectionBackend {} diff --git a/modules/@angular/http/src/backends/xhr_backend.ts b/modules/@angular/http/src/backends/xhr_backend.ts index 876d25a5c9..420c5af3d5 100644 --- a/modules/@angular/http/src/backends/xhr_backend.ts +++ b/modules/@angular/http/src/backends/xhr_backend.ts @@ -31,6 +31,8 @@ const XSSI_PREFIX = /^\)\]\}',?\n/; * * This class would typically not be created or interacted with directly inside applications, though * the {@link MockConnection} may be interacted with in tests. + * + * @experimental */ export class XHRConnection implements Connection { request: Request; @@ -156,6 +158,8 @@ export class XHRConnection implements Connection { * Applications can configure custom cookie and header names by binding an instance of this class * with different `cookieName` and `headerName` values. See the main HTTP documentation for more * details. + * + * @experimental */ export class CookieXSRFStrategy implements XSRFStrategy { constructor( @@ -193,7 +197,8 @@ export class CookieXSRFStrategy implements XSRFStrategy { * } * } * ``` - **/ + * @experimental + */ @Injectable() export class XHRBackend implements ConnectionBackend { constructor( diff --git a/modules/@angular/http/src/base_request_options.ts b/modules/@angular/http/src/base_request_options.ts index ef1c0c0457..fd1cb7018f 100644 --- a/modules/@angular/http/src/base_request_options.ts +++ b/modules/@angular/http/src/base_request_options.ts @@ -40,6 +40,8 @@ import {URLSearchParams} from './url_search_params'; * console.log('req.method:', RequestMethod[req.method]); // Post * console.log('options.url:', options.url); // https://google.com * ``` + * + * @experimental */ export class RequestOptions { /** @@ -164,6 +166,8 @@ export class RequestOptions { * console.log('options.url:', options.url); // null * console.log('req.url:', req.url); // https://google.com * ``` + * + * @experimental */ @Injectable() export class BaseRequestOptions extends RequestOptions { diff --git a/modules/@angular/http/src/base_response_options.ts b/modules/@angular/http/src/base_response_options.ts index e7dee0b70f..8de2d456e7 100644 --- a/modules/@angular/http/src/base_response_options.ts +++ b/modules/@angular/http/src/base_response_options.ts @@ -40,6 +40,8 @@ import {ResponseOptionsArgs} from './interfaces'; * * console.log('res.json():', res.json()); // Object {name: "Jeff"} * ``` + * + * @experimental */ export class ResponseOptions { // TODO: ArrayBuffer | FormData | Blob @@ -155,6 +157,8 @@ export class ResponseOptions { * console.log('res.headers.get("framework"):', res.headers.get('framework')); // angular * console.log('res.text():', res.text()); // Angular; * ``` + * + * @experimental */ @Injectable() export class BaseResponseOptions extends ResponseOptions { diff --git a/modules/@angular/http/src/enums.ts b/modules/@angular/http/src/enums.ts index c3c20f914b..31b25bd95b 100644 --- a/modules/@angular/http/src/enums.ts +++ b/modules/@angular/http/src/enums.ts @@ -8,6 +8,7 @@ /** * Supported http methods. + * @experimental */ export enum RequestMethod { Get, @@ -23,6 +24,7 @@ export enum RequestMethod { * All possible states in which a connection can be, based on * [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an * additional "CANCELLED" state. + * @experimental */ export enum ReadyState { Unsent, @@ -36,6 +38,7 @@ export enum ReadyState { /** * Acceptable response types to be associated with a {@link Response}, based on * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec. + * @experimental */ export enum ResponseType { Basic, @@ -47,6 +50,7 @@ export enum ResponseType { /** * Supported content type to be automatically associated with a {@link Request}. + * @experimental */ export enum ContentType { NONE, diff --git a/modules/@angular/http/src/headers.ts b/modules/@angular/http/src/headers.ts index 5327878d82..efe752851a 100644 --- a/modules/@angular/http/src/headers.ts +++ b/modules/@angular/http/src/headers.ts @@ -36,6 +36,8 @@ import {isListLikeIterable, iterateListLike, Map, MapWrapper, StringMapWrapper, * var thirdHeaders = new Headers(secondHeaders); * console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular' * ``` + * + * @experimental */ export class Headers { /** @internal */ diff --git a/modules/@angular/http/src/http.ts b/modules/@angular/http/src/http.ts index 6182efde28..4141da6a6a 100644 --- a/modules/@angular/http/src/http.ts +++ b/modules/@angular/http/src/http.ts @@ -103,7 +103,8 @@ function mergeOptions( * http.get('request-from-mock-backend.json').subscribe((res:Response) => doSomething(res)); * ``` * - **/ + * @experimental + */ @Injectable() export class Http { constructor(protected _backend: ConnectionBackend, protected _defaultOptions: RequestOptions) {} @@ -186,6 +187,10 @@ export class Http { } } + +/** + * @experimental + */ @Injectable() export class Jsonp extends Http { constructor(backend: ConnectionBackend, defaultOptions: RequestOptions) { diff --git a/modules/@angular/http/src/interfaces.ts b/modules/@angular/http/src/interfaces.ts index fcf714e467..796764ac96 100644 --- a/modules/@angular/http/src/interfaces.ts +++ b/modules/@angular/http/src/interfaces.ts @@ -16,11 +16,15 @@ import {URLSearchParams} from './url_search_params'; * * The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given * {@link Request}. + * + * @experimental */ export abstract class ConnectionBackend { abstract createConnection(request: any): Connection; } /** * Abstract class from which real connections are derived. + * + * @experimental */ export abstract class Connection { readyState: ReadyState; @@ -28,12 +32,18 @@ export abstract class Connection { response: any; // TODO: generic of ; } -/** An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. */ +/** + * An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request. + * + * @experimental + */ export abstract class XSRFStrategy { abstract configureRequest(req: Request): void; } /** * Interface for options to construct a RequestOptions, based on * [RequestInit](https://fetch.spec.whatwg.org/#requestinit) from the Fetch spec. + * + * @experimental */ export interface RequestOptionsArgs { url?: string; @@ -52,6 +62,8 @@ export interface RequestArgs extends RequestOptionsArgs { url: string; } /** * Interface for options to construct a Response, based on * [ResponseInit](https://fetch.spec.whatwg.org/#responseinit) from the Fetch spec. + * + * @experimental */ export type ResponseOptionsArgs = { // TODO: Support Blob, ArrayBuffer, JSON diff --git a/modules/@angular/http/src/static_request.ts b/modules/@angular/http/src/static_request.ts index 265ebc9c2d..fe449cc9f9 100644 --- a/modules/@angular/http/src/static_request.ts +++ b/modules/@angular/http/src/static_request.ts @@ -52,6 +52,8 @@ import {URLSearchParams} from './url_search_params'; * console.log('people', res.json()); * }); * ``` + * + * @experimental */ export class Request { /** diff --git a/modules/@angular/http/src/static_response.ts b/modules/@angular/http/src/static_response.ts index 02f790cbb4..4c341ba655 100644 --- a/modules/@angular/http/src/static_response.ts +++ b/modules/@angular/http/src/static_response.ts @@ -32,6 +32,8 @@ import {isJsObject} from './http_utils'; * Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body * can be accessed many times. There are other differences in the implementation, but this is the * most significant. + * + * @experimental */ export class Response { /** diff --git a/modules/@angular/http/src/url_search_params.ts b/modules/@angular/http/src/url_search_params.ts index 732b23cc94..add96e00ec 100644 --- a/modules/@angular/http/src/url_search_params.ts +++ b/modules/@angular/http/src/url_search_params.ts @@ -32,6 +32,8 @@ function paramParser(rawParams: string = ''): Map { * - setAll() * - appendAll() * - replaceAll() + * + * @experimental */ export class URLSearchParams { paramsMap: Map; diff --git a/modules/@angular/http/testing/mock_backend.ts b/modules/@angular/http/testing/mock_backend.ts index 7ab182f8f9..74dd20a8cf 100644 --- a/modules/@angular/http/testing/mock_backend.ts +++ b/modules/@angular/http/testing/mock_backend.ts @@ -23,7 +23,8 @@ import {Response} from '../src/static_response'; * * Mock Connection to represent a {@link Connection} for tests. * - **/ + * @experimental + */ export class MockConnection implements Connection { // TODO Name `readyState` should change to be more generic, and states could be made to be more // descriptive than XHR states. @@ -141,7 +142,9 @@ export class MockConnection implements Connection { * ``` * * This method only exists in the mock implementation, not in real Backends. - **/ + * + * @experimental + */ @Injectable() export class MockBackend implements ConnectionBackend { /** diff --git a/modules/@angular/platform-browser-dynamic/index.ts b/modules/@angular/platform-browser-dynamic/index.ts index f46e537dbe..bad55239b1 100644 --- a/modules/@angular/platform-browser-dynamic/index.ts +++ b/modules/@angular/platform-browser-dynamic/index.ts @@ -18,6 +18,9 @@ import {CachedXHR} from './src/xhr/xhr_cache'; import {XHRImpl} from './src/xhr/xhr_impl'; +/** + * @experimental + */ export const BROWSER_APP_COMPILER_PROVIDERS: Array = [ COMPILER_PROVIDERS, { provide: CompilerConfig, @@ -32,6 +35,9 @@ export const BROWSER_APP_COMPILER_PROVIDERS: Array = [{provide: XHR, useClass: CachedXHR}]; @@ -104,6 +110,9 @@ export const CACHED_TEMPLATE_PROVIDER: Array = * app injector to override default injection behavior. * * Returns a `Promise` of {@link ComponentRef}. + * + * @experimental This api cannot be used with the offline compiler and thus is still subject to + * change. */ export function bootstrap( appComponentType: Type, diff --git a/modules/@angular/platform-browser-dynamic/testing.ts b/modules/@angular/platform-browser-dynamic/testing.ts index 27303a6b77..04fcae1961 100644 --- a/modules/@angular/platform-browser-dynamic/testing.ts +++ b/modules/@angular/platform-browser-dynamic/testing.ts @@ -18,12 +18,16 @@ export * from './private_export_testing' /** * Default platform providers for testing. + * + * @stable */ export const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array = [TEST_BROWSER_PLATFORM_PROVIDERS]; /** * Default application providers for testing. + * + * @stable */ export const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array = [ TEST_BROWSER_APPLICATION_PROVIDERS, BROWSER_APP_COMPILER_PROVIDERS, diff --git a/modules/@angular/platform-browser/core_private.ts b/modules/@angular/platform-browser/core_private.ts index 43adfcc79c..76f728ae4e 100644 --- a/modules/@angular/platform-browser/core_private.ts +++ b/modules/@angular/platform-browser/core_private.ts @@ -16,6 +16,10 @@ export var VIEW_ENCAPSULATION_VALUES: typeof t.VIEW_ENCAPSULATION_VALUES = r.VIEW_ENCAPSULATION_VALUES; export type DebugDomRootRenderer = t.DebugDomRootRenderer; export var DebugDomRootRenderer: typeof t.DebugDomRootRenderer = r.DebugDomRootRenderer; +/** + * @experimental bogus marker to pass the ts-api-guardian's check - this api should be public so + * this line will go away when that happens + */ export var SecurityContext: typeof t.SecurityContext = r.SecurityContext; export type SecurityContext = t.SecurityContext; export var SanitizationService: typeof t.SanitizationService = r.SanitizationService; diff --git a/modules/@angular/platform-browser/index.ts b/modules/@angular/platform-browser/index.ts index db819c1fb4..a9b80b927d 100644 --- a/modules/@angular/platform-browser/index.ts +++ b/modules/@angular/platform-browser/index.ts @@ -10,12 +10,9 @@ export {BrowserPlatformLocation} from './src/browser/location/browser_platform_l export {Title} from './src/browser/title'; export {disableDebugTools, enableDebugTools} from './src/browser/tools/tools'; export {By} from './src/dom/debug/by'; -export {ELEMENT_PROBE_PROVIDERS} from './src/dom/debug/ng_probe'; export {DOCUMENT} from './src/dom/dom_tokens'; -export {DomEventsPlugin} from './src/dom/events/dom_events'; export {EVENT_MANAGER_PLUGINS, EventManager} from './src/dom/events/event_manager'; export {HAMMER_GESTURE_CONFIG, HammerGestureConfig} from './src/dom/events/hammer_gestures'; -export {KeyEventsPlugin} from './src/dom/events/key_events'; export {DomSanitizationService, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl, SecurityContext} from './src/security/dom_sanitization_service'; export * from './src/browser'; @@ -32,8 +29,3 @@ export * from './src/worker_render'; export * from './src/worker_app'; export * from './private_export'; - -import {BROWSER_PLATFORM_PROVIDERS} from './src/browser'; - -/* @deprecated use BROWSER_PLATFORM_PROVIDERS */ -export const BROWSER_PROVIDERS: any[] = BROWSER_PLATFORM_PROVIDERS; diff --git a/modules/@angular/platform-browser/private_export.ts b/modules/@angular/platform-browser/private_export.ts index d58a7cd97f..9e85d63bf7 100644 --- a/modules/@angular/platform-browser/private_export.ts +++ b/modules/@angular/platform-browser/private_export.ts @@ -6,8 +6,10 @@ * found in the LICENSE file at https://angular.io/license */ +import * as ng_proble from './src/dom/debug/ng_probe'; import * as dom_adapter from './src/dom/dom_adapter'; import * as dom_renderer from './src/dom/dom_renderer'; +import * as dom_events from './src/dom/events/dom_events'; import * as shared_styles_host from './src/dom/shared_styles_host'; export declare namespace __platform_browser_private_types__ { @@ -23,6 +25,9 @@ export declare namespace __platform_browser_private_types__ { export var DomSharedStylesHost: typeof shared_styles_host.DomSharedStylesHost; export type SharedStylesHost = shared_styles_host.SharedStylesHost; export var SharedStylesHost: typeof shared_styles_host.SharedStylesHost; + export var ELEMENT_PROBE_PROVIDERS: typeof ng_proble.ELEMENT_PROBE_PROVIDERS; + export type DomEventsPlugin = dom_events.DomEventsPlugin; + export var DomEventsPlugin: typeof dom_events.DomEventsPlugin; } export var __platform_browser_private__ = { @@ -32,5 +37,7 @@ export var __platform_browser_private__ = { DomRootRenderer: dom_renderer.DomRootRenderer, DomRootRenderer_: dom_renderer.DomRootRenderer_, DomSharedStylesHost: shared_styles_host.DomSharedStylesHost, - SharedStylesHost: shared_styles_host.SharedStylesHost + SharedStylesHost: shared_styles_host.SharedStylesHost, + ELEMENT_PROBE_PROVIDERS: ng_proble.ELEMENT_PROBE_PROVIDERS, + DomEventsPlugin: dom_events.DomEventsPlugin }; diff --git a/modules/@angular/platform-browser/src/browser.ts b/modules/@angular/platform-browser/src/browser.ts index 05f68cda1e..ab30329ea7 100644 --- a/modules/@angular/platform-browser/src/browser.ts +++ b/modules/@angular/platform-browser/src/browser.ts @@ -34,6 +34,8 @@ const BROWSER_PLATFORM_MARKER = new OpaqueToken('BrowserPlatformMarker'); * A set of providers to initialize the Angular platform in a web browser. * * Used automatically by `bootstrap`, or can be passed to {@link platform}. + * + * @experimental API related to bootstrapping are still under review. */ export const BROWSER_PLATFORM_PROVIDERS: Array = [ {provide: BROWSER_PLATFORM_MARKER, useValue: true}, PLATFORM_COMMON_PROVIDERS, @@ -41,6 +43,9 @@ export const BROWSER_PLATFORM_PROVIDERS: Array {provide: PlatformLocation, useClass: BrowserPlatformLocation} ]; +/** + * @experimental + */ export const BROWSER_SANITIZATION_PROVIDERS: Array = [ {provide: SanitizationService, useExisting: DomSanitizationService}, {provide: DomSanitizationService, useClass: DomSanitizationServiceImpl}, @@ -50,6 +55,8 @@ export const BROWSER_SANITIZATION_PROVIDERS: Array = [ * A set of providers to initialize an Angular application in a web browser. * * Used automatically by `bootstrap`, or can be passed to {@link PlatformRef.application}. + * + * @experimental API related to bootstrapping are still under review. */ export const BROWSER_APP_PROVIDERS: Array = [ APPLICATION_COMMON_PROVIDERS, FORM_PROVIDERS, BROWSER_SANITIZATION_PROVIDERS, @@ -66,6 +73,9 @@ export const BROWSER_APP_PROVIDERS: Array = [ Testability, EventManager, ELEMENT_PROBE_PROVIDERS ]; +/** + * @experimental API related to bootstrapping are still under review. + */ export function browserPlatform(): PlatformRef { if (isBlank(getPlatform())) { createPlatform(ReflectiveInjector.resolveAndCreate(BROWSER_PLATFORM_PROVIDERS)); diff --git a/modules/@angular/platform-browser/src/browser/location/browser_platform_location.ts b/modules/@angular/platform-browser/src/browser/location/browser_platform_location.ts index a5847708b6..813d9e199a 100644 --- a/modules/@angular/platform-browser/src/browser/location/browser_platform_location.ts +++ b/modules/@angular/platform-browser/src/browser/location/browser_platform_location.ts @@ -20,6 +20,8 @@ import {supportsState} from './history'; * `PlatformLocation` encapsulates all of the direct calls to platform APIs. * This class should not be used directly by an application developer. Instead, use * {@link Location}. + * + * @stable */ @Injectable() export class BrowserPlatformLocation extends PlatformLocation { diff --git a/modules/@angular/platform-browser/src/browser/tools/tools.dart b/modules/@angular/platform-browser/src/browser/tools/tools.dart index fab97a3201..ad6d0fc08b 100644 --- a/modules/@angular/platform-browser/src/browser/tools/tools.dart +++ b/modules/@angular/platform-browser/src/browser/tools/tools.dart @@ -15,6 +15,8 @@ import 'common_tools.dart' show AngularTools; * 1. Type `ng.` (usually the console will show auto-complete suggestion) * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()` * then hit Enter. + * + * @experimental All debugging apis are currently experimental. */ void enableDebugTools(ComponentRef ref) { final tools = new AngularTools(ref); @@ -29,6 +31,8 @@ void enableDebugTools(ComponentRef ref) { /** * Disables Angular 2 tools. + * + * @experimental All debugging apis are currently experimental. */ void disableDebugTools() { context.deleteProperty('ng'); diff --git a/modules/@angular/platform-browser/src/browser/tools/tools.ts b/modules/@angular/platform-browser/src/browser/tools/tools.ts index 7b386415ea..6424efb321 100644 --- a/modules/@angular/platform-browser/src/browser/tools/tools.ts +++ b/modules/@angular/platform-browser/src/browser/tools/tools.ts @@ -23,6 +23,8 @@ var context = global; * 1. Type `ng.` (usually the console will show auto-complete suggestion) * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()` * then hit Enter. + * + * @experimental All debugging apis are currently experimental. */ export function enableDebugTools(ref: ComponentRef): ComponentRef { context.ng = new AngularTools(ref); @@ -31,6 +33,8 @@ export function enableDebugTools(ref: ComponentRef): ComponentRef { /** * Disables Angular 2 tools. + * + * @experimental All debugging apis are currently experimental. */ export function disableDebugTools(): void { delete context.ng; diff --git a/modules/@angular/platform-browser/src/dom/debug/by.ts b/modules/@angular/platform-browser/src/dom/debug/by.ts index ecfbcd6d74..d0bc19d84a 100644 --- a/modules/@angular/platform-browser/src/dom/debug/by.ts +++ b/modules/@angular/platform-browser/src/dom/debug/by.ts @@ -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 { /** diff --git a/modules/@angular/platform-browser/src/dom/dom_tokens.ts b/modules/@angular/platform-browser/src/dom/dom_tokens.ts index d143c5475d..234d877057 100644 --- a/modules/@angular/platform-browser/src/dom/dom_tokens.ts +++ b/modules/@angular/platform-browser/src/dom/dom_tokens.ts @@ -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'); diff --git a/modules/@angular/platform-browser/src/dom/events/event_manager.ts b/modules/@angular/platform-browser/src/dom/events/event_manager.ts index 33eff060d1..4c54513d29 100644 --- a/modules/@angular/platform-browser/src/dom/events/event_manager.ts +++ b/modules/@angular/platform-browser/src/dom/events/event_manager.ts @@ -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[]; diff --git a/modules/@angular/platform-browser/src/dom/events/hammer_gestures.ts b/modules/@angular/platform-browser/src/dom/events/hammer_gestures.ts index f0708aa5f0..04f15f8b4c 100644 --- a/modules/@angular/platform-browser/src/dom/events/hammer_gestures.ts +++ b/modules/@angular/platform-browser/src/dom/events/hammer_gestures.ts @@ -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[] = []; diff --git a/modules/@angular/platform-browser/src/dom/events/key_events.ts b/modules/@angular/platform-browser/src/dom/events/key_events.ts index e8bdf5d464..0351ed9f46 100644 --- a/modules/@angular/platform-browser/src/dom/events/key_events.ts +++ b/modules/@angular/platform-browser/src/dom/events/key_events.ts @@ -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(); } diff --git a/modules/@angular/platform-browser/src/security/dom_sanitization_service.ts b/modules/@angular/platform-browser/src/security/dom_sanitization_service.ts index 25e21d8fea..7363d8f639 100644 --- a/modules/@angular/platform-browser/src/security/dom_sanitization_service.ts +++ b/modules/@angular/platform-browser/src/security/dom_sanitization_service.ts @@ -19,17 +19,44 @@ export {SecurityContext}; /** * Marker interface for a value that's safe to use in a particular context. + * + * @stable */ export interface SafeValue {} -/** Marker interface for a value that's safe to use as HTML. */ + +/** + * Marker interface for a value that's safe to use as HTML. + * + * @stable + */ export interface SafeHtml extends SafeValue {} -/** Marker interface for a value that's safe to use as style (CSS). */ + +/** + * Marker interface for a value that's safe to use as style (CSS). + * + * @stable + */ export interface SafeStyle extends SafeValue {} -/** Marker interface for a value that's safe to use as JavaScript. */ + +/** + * Marker interface for a value that's safe to use as JavaScript. + * + * @stable + */ export interface SafeScript extends SafeValue {} -/** Marker interface for a value that's safe to use as a URL linking to a document. */ + +/** + * Marker interface for a value that's safe to use as a URL linking to a document. + * + * @stable + */ export interface SafeUrl extends SafeValue {} -/** Marker interface for a value that's safe to use as a URL to load executable code from. */ + +/** + * Marker interface for a value that's safe to use as a URL to load executable code from. + * + * @stable + */ export interface SafeResourceUrl extends SafeValue {} /** @@ -55,6 +82,8 @@ export interface SafeResourceUrl extends SafeValue {} * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous * code. The sanitizer leaves safe values intact. + * + * @stable */ export abstract class DomSanitizationService implements SanitizationService { /** diff --git a/modules/@angular/platform-browser/src/web_workers/shared/client_message_broker.ts b/modules/@angular/platform-browser/src/web_workers/shared/client_message_broker.ts index 139cdd3302..c22e0683ec 100644 --- a/modules/@angular/platform-browser/src/web_workers/shared/client_message_broker.ts +++ b/modules/@angular/platform-browser/src/web_workers/shared/client_message_broker.ts @@ -16,7 +16,7 @@ import {MessageBus} from './message_bus'; import {Serializer} from './serializer'; /** - * @experimental + * @experimental WebWorker support in Angular is experimental. */ export abstract class ClientMessageBrokerFactory { /** @@ -44,7 +44,7 @@ export class ClientMessageBrokerFactory_ extends ClientMessageBrokerFactory { } /** - * @experimental + * @experimental WebWorker support in Angular is experimental. */ export abstract class ClientMessageBroker { abstract runOnService(args: UiArguments, returnType: Type): Promise; @@ -163,14 +163,14 @@ class MessageData { } /** - * @experimental + * @experimental WebWorker support in Angular is experimental. */ export class FnArg { constructor(public value: any /** TODO #9100 */, public type: Type) {} } /** - * @experimental + * @experimental WebWorker support in Angular is experimental. */ export class UiArguments { constructor(public method: string, public args?: FnArg[]) {} diff --git a/modules/@angular/platform-browser/src/web_workers/shared/message_bus.ts b/modules/@angular/platform-browser/src/web_workers/shared/message_bus.ts index 570b3a62df..95f2d13f51 100644 --- a/modules/@angular/platform-browser/src/web_workers/shared/message_bus.ts +++ b/modules/@angular/platform-browser/src/web_workers/shared/message_bus.ts @@ -16,7 +16,8 @@ import {EventEmitter} from '../../facade/async'; * Communication is based on a channel abstraction. Messages published in a * given channel to one MessageBusSink are received on the same channel * by the corresponding MessageBusSource. - * @experimental + * + * @experimental WebWorker support in Angular is currenlty experimental. */ export abstract class MessageBus implements MessageBusSource, MessageBusSink { /** @@ -51,7 +52,7 @@ export abstract class MessageBus implements MessageBusSource, MessageBusSink { } /** - * @experimental + * @experimental WebWorker support in Angular is currenlty experimental. */ export interface MessageBusSource { /** @@ -77,7 +78,7 @@ export interface MessageBusSource { } /** - * @experimental + * @experimental WebWorker support in Angular is currenlty experimental. */ export interface MessageBusSink { /** diff --git a/modules/@angular/platform-browser/src/web_workers/shared/serializer.ts b/modules/@angular/platform-browser/src/web_workers/shared/serializer.ts index 7935c30016..a1a76e0c35 100644 --- a/modules/@angular/platform-browser/src/web_workers/shared/serializer.ts +++ b/modules/@angular/platform-browser/src/web_workers/shared/serializer.ts @@ -20,7 +20,7 @@ import {LocationType} from './serialized_types'; // PRIMITIVE is any type that does not need to be serialized (string, number, boolean) // We set it to String so that it is considered a Type. /** - * @experimental + * @experimental WebWorker support in Angular is currently experimental. */ export const PRIMITIVE: Type = String; diff --git a/modules/@angular/platform-browser/src/web_workers/shared/service_message_broker.ts b/modules/@angular/platform-browser/src/web_workers/shared/service_message_broker.ts index 70e93046cf..46d21bf9a2 100644 --- a/modules/@angular/platform-browser/src/web_workers/shared/service_message_broker.ts +++ b/modules/@angular/platform-browser/src/web_workers/shared/service_message_broker.ts @@ -14,6 +14,9 @@ import {FunctionWrapper, Type, isPresent} from '../../facade/lang'; import {MessageBus} from '../shared/message_bus'; import {Serializer} from '../shared/serializer'; +/** + * @experimental WebWorker support in Angular is currently experimental. + */ export abstract class ServiceMessageBrokerFactory { /** * Initializes the given channel and attaches a new {@link ServiceMessageBroker} to it. @@ -38,19 +41,18 @@ export class ServiceMessageBrokerFactory_ extends ServiceMessageBrokerFactory { } /** - * @experimental + * Helper class for UIComponents that allows components to register methods. + * If a registered method message is received from the broker on the worker, + * the UIMessageBroker deserializes its arguments and calls the registered method. + * If that method returns a promise, the UIMessageBroker returns the result to the worker. + * + * @experimental WebWorker support in Angular is currently experimental. */ export abstract class ServiceMessageBroker { abstract registerMethod( methodName: string, signature: Type[], method: Function, returnType?: Type): void; } -/** - * Helper class for UIComponents that allows components to register methods. - * If a registered method message is received from the broker on the worker, - * the UIMessageBroker deserializes its arguments and calls the registered method. - * If that method returns a promise, the UIMessageBroker returns the result to the worker. - */ export class ServiceMessageBroker_ extends ServiceMessageBroker { private _sink: EventEmitter; private _methods: Map = new Map(); @@ -100,7 +102,7 @@ export class ServiceMessageBroker_ extends ServiceMessageBroker { } /** - * @experimental + * @experimental WebWorker support in Angular is currently experimental. */ export class ReceivedMessage { method: string; diff --git a/modules/@angular/platform-browser/src/worker_render.ts b/modules/@angular/platform-browser/src/worker_render.ts index 6234cb0262..e76591b28b 100644 --- a/modules/@angular/platform-browser/src/worker_render.ts +++ b/modules/@angular/platform-browser/src/worker_render.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {APPLICATION_COMMON_PROVIDERS, APP_INITIALIZER, ApplicationRef, ExceptionHandler, Injectable, Injector, NgZone, OpaqueToken, PLATFORM_COMMON_PROVIDERS, PLATFORM_INITIALIZER, PlatformRef, ReflectiveInjector, RootRenderer, Testability, assertPlatform, createPlatform, getPlatform} from '@angular/core'; +import {APPLICATION_COMMON_PROVIDERS, APP_INITIALIZER, ExceptionHandler, Injectable, Injector, NgZone, OpaqueToken, PLATFORM_COMMON_PROVIDERS, PLATFORM_INITIALIZER, PlatformRef, ReflectiveInjector, RootRenderer, Testability, assertPlatform, createPlatform, getPlatform} from '@angular/core'; import {AnimationDriver, NoOpAnimationDriver, wtfInit} from '../core_private'; @@ -37,7 +37,8 @@ const WORKER_RENDER_PLATFORM_MARKER = new OpaqueToken('WorkerRenderPlatformMarke /** * Wrapper class that exposes the Worker * and underlying {@link MessageBus} for lower level message passing. - * @experimental + * + * @experimental WebWorker support is currently experimental. */ @Injectable() export class WebWorkerInstance { @@ -52,7 +53,7 @@ export class WebWorkerInstance { } /** - * @experimental + * @experimental WebWorker support is currently experimental. */ export const WORKER_SCRIPT: OpaqueToken = new OpaqueToken('WebWorkerScript'); @@ -61,13 +62,13 @@ export const WORKER_SCRIPT: OpaqueToken = new OpaqueToken('WebWorkerScript'); * created. * * TODO(vicb): create an interface for startable services to implement - * @experimental + * @experimental WebWorker support is currently experimental. */ export const WORKER_UI_STARTABLE_MESSAGING_SERVICE = new OpaqueToken('WorkerRenderStartableMsgService'); /** - * @experimental + * @experimental WebWorker support is currently experimental. */ export const WORKER_UI_PLATFORM_PROVIDERS: Array = [ PLATFORM_COMMON_PROVIDERS, {provide: WORKER_RENDER_PLATFORM_MARKER, useValue: true}, @@ -75,7 +76,7 @@ export const WORKER_UI_PLATFORM_PROVIDERS: Array = [ APPLICATION_COMMON_PROVIDERS, @@ -128,7 +129,7 @@ function initWebWorkerRenderPlatform(): void { } /** - * @experimental + * @experimental WebWorker support is currently experimental. */ export function workerUiPlatform(): PlatformRef { if (isBlank(getPlatform())) { diff --git a/modules/@angular/platform-browser/testing/browser.ts b/modules/@angular/platform-browser/testing/browser.ts index 6d07ccd9bd..4b62187ba3 100644 --- a/modules/@angular/platform-browser/testing/browser.ts +++ b/modules/@angular/platform-browser/testing/browser.ts @@ -44,12 +44,16 @@ function createNgZone(): NgZone { /** * Default platform providers for testing. + * + * @stable */ export const TEST_BROWSER_PLATFORM_PROVIDERS: Array = TEST_BROWSER_STATIC_PLATFORM_PROVIDERS; /** * Default application providers for testing without a compiler. + * + * @stable */ export const TEST_BROWSER_APPLICATION_PROVIDERS: Array = [BROWSER_APP_PROVIDERS, ADDITIONAL_TEST_BROWSER_STATIC_PROVIDERS]; diff --git a/modules/@angular/platform-browser/testing/e2e_util.ts b/modules/@angular/platform-browser/testing/e2e_util.ts index 0f73396a05..bf4eb16cfc 100644 --- a/modules/@angular/platform-browser/testing/e2e_util.ts +++ b/modules/@angular/platform-browser/testing/e2e_util.ts @@ -12,6 +12,9 @@ import * as webdriver from 'selenium-webdriver'; declare var browser: any; declare var expect: any; +/** + * @experimental This API will be moved to Protractor. + */ export function verifyNoBrowserErrors() { // TODO(tbosch): Bug in ChromeDriver: Need to execute at least one command // so that the browser logs can be read out! diff --git a/modules/@angular/platform-server/platform_browser_private.ts b/modules/@angular/platform-server/platform_browser_private.ts index fc36935d43..56dea7c77f 100644 --- a/modules/@angular/platform-server/platform_browser_private.ts +++ b/modules/@angular/platform-server/platform_browser_private.ts @@ -20,3 +20,7 @@ export type DomSharedStylesHost = typeof t.DomSharedStylesHost; export var DomSharedStylesHost: typeof t.DomSharedStylesHost = r.DomSharedStylesHost; export type SharedStylesHost = typeof t.SharedStylesHost; export var SharedStylesHost: typeof t.SharedStylesHost = r.SharedStylesHost; +export type ELEMENT_PROBE_PROVIDERS = typeof t.ELEMENT_PROBE_PROVIDERS; +export var ELEMENT_PROBE_PROVIDERS: typeof t.ELEMENT_PROBE_PROVIDERS = r.ELEMENT_PROBE_PROVIDERS; +export type DomEventsPlugin = typeof t.DomEventsPlugin; +export var DomEventsPlugin: typeof t.DomEventsPlugin = r.DomEventsPlugin; diff --git a/modules/@angular/platform-server/testing/server.ts b/modules/@angular/platform-server/testing/server.ts index de165a0f51..17a8b437df 100644 --- a/modules/@angular/platform-server/testing/server.ts +++ b/modules/@angular/platform-server/testing/server.ts @@ -10,21 +10,21 @@ import {COMPILER_PROVIDERS, DirectiveResolver, ViewResolver, XHR} from '@angular import {MockDirectiveResolver, MockViewResolver, OverridingTestComponentBuilder} from '@angular/compiler/testing'; import {APPLICATION_COMMON_PROVIDERS, APP_ID, NgZone, PLATFORM_COMMON_PROVIDERS, PLATFORM_INITIALIZER, RootRenderer} from '@angular/core'; import {TestComponentBuilder, TestComponentRenderer} from '@angular/core/testing'; +import {BROWSER_SANITIZATION_PROVIDERS, DOCUMENT, EVENT_MANAGER_PLUGINS, EventManager} from '@angular/platform-browser'; import {AnimationDriver, NoOpAnimationDriver} from '../core_private'; import {DOMTestComponentRenderer} from '../platform_browser_dynamic_testing_private'; +import {DomEventsPlugin, DomRootRenderer, DomRootRenderer_, DomSharedStylesHost, ELEMENT_PROBE_PROVIDERS, SharedStylesHost, getDOM} from '../platform_browser_private'; import {Parse5DomAdapter} from '../src/parse5_adapter'; -import {DOCUMENT, BROWSER_SANITIZATION_PROVIDERS, EventManager, EVENT_MANAGER_PLUGINS, ELEMENT_PROBE_PROVIDERS, DomEventsPlugin,} from '@angular/platform-browser'; -import {getDOM, DomRootRenderer, DomRootRenderer_, DomSharedStylesHost, SharedStylesHost} from '../platform_browser_private'; -import {LocationStrategy} from '@angular/common'; - function initServerTests() { Parse5DomAdapter.makeCurrent(); } /** * Default platform providers for testing. + * + * @experimental */ export const TEST_SERVER_PLATFORM_PROVIDERS: Array = /*@ts2dart_const*/[ @@ -52,6 +52,8 @@ function createNgZone(): NgZone { /** * Default application providers for testing. + * + * @experimental */ export const TEST_SERVER_APPLICATION_PROVIDERS: Array = /*@ts2dart_const*/[ diff --git a/modules/@angular/router/index.ts b/modules/@angular/router/index.ts index 25628fd3c7..24b0f9d8d2 100644 --- a/modules/@angular/router/index.ts +++ b/modules/@angular/router/index.ts @@ -20,4 +20,8 @@ export {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot export {PRIMARY_OUTLET, Params} from './src/shared'; export {DefaultUrlSerializer, UrlPathWithParams, UrlSerializer, UrlTree} from './src/url_tree'; -export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive]; \ No newline at end of file + +/** + * @experimental + */ +export const ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive]; diff --git a/modules/@angular/router/src/common_router_providers.ts b/modules/@angular/router/src/common_router_providers.ts index 1540b2ff6b..4f35a4c7af 100644 --- a/modules/@angular/router/src/common_router_providers.ts +++ b/modules/@angular/router/src/common_router_providers.ts @@ -18,6 +18,9 @@ import {DefaultUrlSerializer, UrlSerializer} from './url_tree'; export const ROUTER_CONFIG = new OpaqueToken('ROUTER_CONFIG'); export const ROUTER_OPTIONS = new OpaqueToken('ROUTER_OPTIONS'); +/** + * @experimental + */ export interface ExtraOptions { enableTracing?: boolean; } export function setupRouter( @@ -76,6 +79,8 @@ export function setupRouterInitializer(injector: Injector) { * * bootstrap(AppCmp, [provideRouter(router)]); * ``` + * + * @experimental */ export function provideRouter(_config: RouterConfig, _opts: ExtraOptions): any[] { return [ diff --git a/modules/@angular/router/src/config.ts b/modules/@angular/router/src/config.ts index bf24129844..6ed672958a 100644 --- a/modules/@angular/router/src/config.ts +++ b/modules/@angular/router/src/config.ts @@ -8,14 +8,29 @@ import {Type} from '@angular/core'; +/** + * @experimental + */ export type RouterConfig = Route[]; + +/** + * @experimental + */ export type Data = { [name: string]: any }; + +/** + * @experimental + */ export type ResolveData = { [name: string]: any }; + +/** + * @experimental + */ export interface Route { path?: string; @@ -65,4 +80,4 @@ function validateNode(route: Route): void { throw new Error( `Invalid route configuration of route '{path: "${route.path}", redirectTo: "${route.redirectTo}"}': please provide 'pathMatch'. ${exp}`); } -} \ No newline at end of file +} diff --git a/modules/@angular/router/src/interfaces.ts b/modules/@angular/router/src/interfaces.ts index bcd38b231d..1687dfe2e1 100644 --- a/modules/@angular/router/src/interfaces.ts +++ b/modules/@angular/router/src/interfaces.ts @@ -11,6 +11,8 @@ import {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state'; /** * An interface a class can implement to be a guard deciding if a route can be activated. + * + * @experimental */ export interface CanActivate { canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): @@ -19,12 +21,17 @@ export interface CanActivate { /** * An interface a class can implement to be a guard deciding if a route can be deactivated. + * + * @experimental */ export interface CanDeactivate { canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable|boolean; } +/** + * @experimental + */ export interface Resolve { resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable|any; -} \ No newline at end of file +} diff --git a/modules/@angular/router/src/router.ts b/modules/@angular/router/src/router.ts index 3a77d566f5..42abae452b 100644 --- a/modules/@angular/router/src/router.ts +++ b/modules/@angular/router/src/router.ts @@ -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) {} } diff --git a/modules/@angular/router/src/router_outlet_map.ts b/modules/@angular/router/src/router_outlet_map.ts index 5476825ef2..d26f585698 100644 --- a/modules/@angular/router/src/router_outlet_map.ts +++ b/modules/@angular/router/src/router_outlet_map.ts @@ -8,6 +8,9 @@ import {RouterOutlet} from './directives/router_outlet'; +/** + * @experimental + */ export class RouterOutletMap { /** @internal */ _outlets: {[name: string]: RouterOutlet} = {}; diff --git a/modules/@angular/router/src/router_providers.ts b/modules/@angular/router/src/router_providers.ts index 3d43e0921e..2d1ff993cb 100644 --- a/modules/@angular/router/src/router_providers.ts +++ b/modules/@angular/router/src/router_providers.ts @@ -30,6 +30,8 @@ import {RouterConfig} from './config'; * * bootstrap(AppCmp, [provideRouter(router)]); * ``` + * + * @experimental */ export function provideRouter(config: RouterConfig, opts: ExtraOptions = {}): any[] { return [ diff --git a/modules/@angular/router/src/router_state.ts b/modules/@angular/router/src/router_state.ts index 7e276b356d..ef97031e6d 100644 --- a/modules/@angular/router/src/router_state.ts +++ b/modules/@angular/router/src/router_state.ts @@ -31,6 +31,8 @@ import {Tree, TreeNode} from './utils/tree'; * } * } * ``` + * + * @experimental */ export class RouterState extends Tree { /** @@ -85,6 +87,8 @@ function createEmptyStateSnapshot(urlTree: UrlTree, rootComponent: Type): Router * } * } * ``` + * + * @experimental */ export class ActivatedRoute { /** @internal */ @@ -137,6 +141,8 @@ export class InheritedResolve { * } * } * ``` + * + * @experimental */ export class ActivatedRouteSnapshot { /** @@ -188,6 +194,8 @@ export class ActivatedRouteSnapshot { * } * } * ``` + * + * @experimental */ export class RouterStateSnapshot extends Tree { /** @@ -227,4 +235,4 @@ export function advanceActivatedRoute(route: ActivatedRoute): void { route.snapshot = route._futureSnapshot; (route.data).next(route._futureSnapshot.data); } -} \ No newline at end of file +} diff --git a/modules/@angular/router/src/shared.ts b/modules/@angular/router/src/shared.ts index c7a8419490..244c143fa8 100644 --- a/modules/@angular/router/src/shared.ts +++ b/modules/@angular/router/src/shared.ts @@ -9,11 +9,15 @@ /** * Name of the primary outlet. * @type {string} + * + * @experimental */ export const PRIMARY_OUTLET = 'PRIMARY_OUTLET'; /** * A collection of parameters. + * + * @experimental */ export type Params = { [key: string]: any diff --git a/modules/@angular/router/src/url_tree.ts b/modules/@angular/router/src/url_tree.ts index af830edf1f..b179a9d152 100644 --- a/modules/@angular/router/src/url_tree.ts +++ b/modules/@angular/router/src/url_tree.ts @@ -62,6 +62,8 @@ function containsSegmentHelper( /** * A URL in the tree form. + * + * @experimental */ export class UrlTree { /** @@ -96,6 +98,10 @@ export class UrlSegment { toString(): string { return serializePaths(this); } } + +/** + * @experimental + */ export class UrlPathWithParams { constructor(public path: string, public parameters: {[key: string]: string}) {} toString(): string { return serializePath(this); } @@ -153,6 +159,8 @@ export function mapChildrenIntoArray( /** * Defines a way to serialize/deserialize a url tree. + * + * @experimental */ export abstract class UrlSerializer { /** @@ -168,6 +176,8 @@ export abstract class UrlSerializer { /** * A default implementation of the serialization. + * + * @experimental */ export class DefaultUrlSerializer implements UrlSerializer { parse(url: string): UrlTree { @@ -427,4 +437,4 @@ class UrlParser { return segments; } -} \ No newline at end of file +} diff --git a/modules/@angular/upgrade/src/upgrade_adapter.ts b/modules/@angular/upgrade/src/upgrade_adapter.ts index bc339386e3..033c552df4 100644 --- a/modules/@angular/upgrade/src/upgrade_adapter.ts +++ b/modules/@angular/upgrade/src/upgrade_adapter.ts @@ -87,6 +87,8 @@ var upgradeCount: number = 0; * "ng2[ng1[Hello World!](transclude)](project)"); * }); * ``` + * + * @experimental */ export class UpgradeAdapter { /* @internal */ @@ -567,6 +569,8 @@ function ng1ComponentDirective(info: ComponentInfo, idPrefix: string): Function /** * Use `UgradeAdapterRef` to control a hybrid AngularJS v1 / Angular v2 application. + * + * @experimental */ export class UpgradeAdapterRef { /* @internal */ diff --git a/modules/playground/src/key_events/index.ts b/modules/playground/src/key_events/index.ts index 1a8463b503..3c3bfd27a4 100644 --- a/modules/playground/src/key_events/index.ts +++ b/modules/playground/src/key_events/index.ts @@ -8,7 +8,8 @@ import {bootstrap} from '@angular/platform-browser-dynamic'; import {Component} from '@angular/core'; -import {KeyEventsPlugin} from '@angular/platform-browser'; +// TODO: remove deep import by reimplementing the event name serialization +import {KeyEventsPlugin} from "@angular/platform-browser/src/dom/events/key_events"; @Component({ selector: 'key-events-app', diff --git a/tools/public_api_guard/common/index.d.ts b/tools/public_api_guard/common/index.d.ts index cf5db0a346..2af6131cf1 100644 --- a/tools/public_api_guard/common/index.d.ts +++ b/tools/public_api_guard/common/index.d.ts @@ -565,15 +565,17 @@ export declare class UpperCasePipe implements PipeTransform { transform(value: string): string; } -/** @stable */ +/** @experimental */ export interface UrlChangeEvent { type: string; } +/** @experimental */ export interface UrlChangeListener { (e: UrlChangeEvent): any; } +/** @experimental */ export interface Validator { validate(c: AbstractControl): { [key: string]: any; diff --git a/tools/public_api_guard/common/testing.d.ts b/tools/public_api_guard/common/testing.d.ts index 8c6f3ddeea..e9d5546826 100644 --- a/tools/public_api_guard/common/testing.d.ts +++ b/tools/public_api_guard/common/testing.d.ts @@ -1,3 +1,4 @@ +/** @experimental */ export declare class SpyLocation implements Location { urlChanges: string[]; back(): void; diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index 8c2e0293e8..1cb4b5817b 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -25,33 +25,40 @@ export declare abstract class AfterViewInit { abstract ngAfterViewInit(): any; } +/** @experimental */ export declare function animate(timing: string | number, styles?: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata): AnimationAnimateMetadata; +/** @experimental */ export declare class AnimationAnimateMetadata extends AnimationMetadata { styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata; timings: string | number; constructor(timings: string | number, styles: AnimationStyleMetadata | AnimationKeyframesSequenceMetadata); } +/** @experimental */ export declare class AnimationEntryMetadata { definitions: AnimationStateMetadata[]; name: string; constructor(name: string, definitions: AnimationStateMetadata[]); } +/** @experimental */ export declare class AnimationGroupMetadata extends AnimationWithStepsMetadata { steps: AnimationMetadata[]; constructor(_steps: AnimationMetadata[]); } +/** @experimental */ export declare class AnimationKeyframesSequenceMetadata extends AnimationMetadata { steps: AnimationStyleMetadata[]; constructor(steps: AnimationStyleMetadata[]); } +/** @experimental */ export declare abstract class AnimationMetadata { } +/** @experimental */ export declare abstract class AnimationPlayer { parentPlayer: AnimationPlayer; abstract destroy(): void; @@ -65,26 +72,31 @@ export declare abstract class AnimationPlayer { abstract setPosition(p: any): void; } +/** @experimental */ export declare class AnimationSequenceMetadata extends AnimationWithStepsMetadata { steps: AnimationMetadata[]; constructor(_steps: AnimationMetadata[]); } +/** @experimental */ export declare class AnimationStateDeclarationMetadata extends AnimationStateMetadata { stateNameExpr: string; styles: AnimationStyleMetadata; constructor(stateNameExpr: string, styles: AnimationStyleMetadata); } +/** @experimental */ export declare abstract class AnimationStateMetadata { } +/** @experimental */ export declare class AnimationStateTransitionMetadata extends AnimationStateMetadata { stateChangeExpr: string; steps: AnimationMetadata; constructor(stateChangeExpr: string, steps: AnimationMetadata); } +/** @experimental */ export declare class AnimationStyleMetadata extends AnimationMetadata { offset: number; styles: Array, offset?: number); } +/** @experimental */ export declare abstract class AnimationWithStepsMetadata extends AnimationMetadata { steps: AnimationMetadata[]; constructor(); @@ -111,7 +124,7 @@ export declare const APPLICATION_COMMON_PROVIDERS: Array; -/** @stable */ +/** @experimental */ export declare abstract class ApplicationRef { componentTypes: Type[]; injector: Injector; @@ -142,11 +155,13 @@ export declare class AttributeMetadata extends DependencyMetadata { toString(): string; } +/** @stable */ export interface AttributeMetadataFactory { (name: string): TypeDecorator; new (name: string): AttributeMetadata; } +/** @experimental */ export declare const AUTO_STYLE: string; /** @stable */ @@ -194,6 +209,7 @@ export declare abstract class ChangeDetectorRef { /** @stable */ export declare function Class(clsDef: ClassDefinition): ConcreteType; +/** @stable */ export interface ClassDefinition { constructor: Function | any[]; extends?: Type; @@ -213,6 +229,7 @@ export declare class CollectionChangeRecord { /** @stable */ export declare var Component: ComponentMetadataFactory; +/** @stable */ export interface ComponentDecorator extends TypeDecorator { View(obj: { templateUrl?: string; @@ -227,6 +244,7 @@ export interface ComponentDecorator extends TypeDecorator { }): ViewDecorator; } +/** @stable */ export declare class ComponentFactory { componentType: Type; selector: string; @@ -234,6 +252,7 @@ export declare class ComponentFactory { create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any): ComponentRef; } +/** @stable */ export declare abstract class ComponentFactoryResolver { abstract resolveComponentFactory(component: ClassWithConstructor): ComponentFactory; static NULL: ComponentFactoryResolver; @@ -282,6 +301,7 @@ export declare class ComponentMetadata extends DirectiveMetadata { }); } +/** @stable */ export interface ComponentMetadataFactory { (obj: { selector?: string; @@ -485,6 +505,7 @@ export declare class DefaultIterableDiffer implements IterableDiffer { /** @stable */ export declare var Directive: DirectiveMetadataFactory; +/** @stable */ export interface DirectiveDecorator extends TypeDecorator { } @@ -518,6 +539,7 @@ export declare class DirectiveMetadata extends InjectableMetadata { }); } +/** @stable */ export interface DirectiveMetadataFactory { (obj: { selector?: string; @@ -565,6 +587,7 @@ export declare abstract class DynamicComponentLoader { abstract loadNextToLocation(type: Type, location: ViewContainerRef, providers?: ResolvedReflectiveProvider[], projectableNodes?: any[][]): Promise>; } +/** @stable */ export declare class ElementRef { /** @stable */ nativeElement: any; constructor(nativeElement: any); @@ -577,7 +600,7 @@ export declare abstract class EmbeddedViewRef extends ViewRef { abstract destroy(): any; } -/** @stable */ +/** @experimental */ export declare function enableProdMode(): void; /** @stable */ @@ -604,6 +627,7 @@ export declare class ExpressionChangedAfterItHasBeenCheckedException extends Bas /** @experimental */ export declare function forwardRef(forwardRefFn: ForwardRefFn): Type; +/** @experimental */ export interface ForwardRefFn { (): any; } @@ -614,11 +638,13 @@ export declare function getDebugNode(nativeNode: any): DebugNode; /** @experimental */ export declare function getPlatform(): PlatformRef; +/** @experimental */ export interface GetTestability { addToWindow(registry: TestabilityRegistry): void; findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean): Testability; } +/** @experimental */ export declare function group(steps: AnimationMetadata[]): AnimationGroupMetadata; /** @stable */ @@ -732,6 +758,7 @@ export declare class InvalidProviderError extends BaseException { constructor(provider: any); } +/** @experimental */ export declare function isDevMode(): boolean; /** @stable */ @@ -740,6 +767,7 @@ export interface IterableDiffer { onDestroy(): any; } +/** @stable */ export interface IterableDifferFactory { create(cdRef: ChangeDetectorRef, trackByFn?: TrackByFn): IterableDiffer; supports(objects: any): boolean; @@ -754,6 +782,7 @@ export declare class IterableDiffers { static extend(factories: IterableDifferFactory[]): Provider; } +/** @experimental */ export declare function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata; /** @stable */ @@ -765,11 +794,13 @@ export declare class KeyValueChangeRecord { toString(): string; } +/** @stable */ export interface KeyValueDiffer { diff(object: any): any; onDestroy(): any; } +/** @stable */ export interface KeyValueDifferFactory { create(cdRef: ChangeDetectorRef): KeyValueDiffer; supports(objects: any): boolean; @@ -784,6 +815,7 @@ export declare class KeyValueDiffers { static extend(factories: KeyValueDifferFactory[]): Provider; } +/** @experimental */ export declare function lockRunMode(): void; /** @experimental */ @@ -818,6 +850,7 @@ export declare class NoAnnotationError extends BaseException { constructor(typeOrFunc: any, params: any[][]); } +/** @stable */ export declare class NoComponentFactoryError extends BaseException { component: Function; constructor(component: Function); @@ -911,6 +944,7 @@ export interface PipeMetadataFactory { }): any; } +/** @stable */ export interface PipeTransform { transform(value: any, ...args: any[]): any; } @@ -927,7 +961,7 @@ export declare const PLATFORM_INITIALIZER: any; /** @stable */ export declare const PLATFORM_PIPES: OpaqueToken; -/** @stable */ +/** @experimental */ export declare abstract class PlatformRef { disposed: boolean; injector: Injector; @@ -1025,6 +1059,7 @@ export interface QueryMetadataFactory { }): QueryMetadata; } +/** @stable */ export declare abstract class ReflectiveInjector implements Injector { parent: Injector; createChildFromResolved(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; @@ -1100,6 +1135,7 @@ export declare class ResolvedReflectiveFactory { dependencies: ReflectiveDependency[]); } +/** @experimental */ export interface ResolvedReflectiveProvider { key: ReflectiveKey; multiProvider: boolean; @@ -1128,6 +1164,7 @@ export interface SelfMetadataFactory { new (): SelfMetadata; } +/** @experimental */ export declare function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata; /** @experimental */ @@ -1160,8 +1197,10 @@ export interface SkipSelfMetadataFactory { new (): SkipSelfMetadata; } +/** @experimental */ export declare function state(stateNameExpr: string, styles: AnimationStyleMetadata): AnimationStateDeclarationMetadata; +/** @experimental */ export declare function style(tokens: string | { [key: string]: string | number; } | Array; @@ -1326,6 +1372,7 @@ export declare class ViewMetadata { }); } +/** @experimental */ export interface ViewMetadataFactory { (obj: { templateUrl?: string; @@ -1399,6 +1446,7 @@ export declare var wtfEndTimeRange: (range: any) => void; /** @experimental */ export declare var wtfLeave: (scope: any, returnValue?: T) => T; +/** @experimental */ export interface WtfScopeFn { (arg0?: any, arg1?: any): any; } diff --git a/tools/public_api_guard/core/testing.d.ts b/tools/public_api_guard/core/testing.d.ts index a71c76033f..d025b83aba 100644 --- a/tools/public_api_guard/core/testing.d.ts +++ b/tools/public_api_guard/core/testing.d.ts @@ -1,8 +1,10 @@ +/** @stable */ export declare function addProviders(providers: Array): void; /** @deprecated */ export declare var afterEach: Function; +/** @stable */ export declare function async(fn: Function): (done: any) => any; /** @deprecated */ @@ -11,6 +13,7 @@ export declare var beforeEach: any; /** @deprecated */ export declare function beforeEachProviders(fn: () => Array): void; +/** @stable */ export declare class ComponentFixture { changeDetectorRef: ChangeDetectorRef; componentInstance: any; @@ -28,8 +31,10 @@ export declare class ComponentFixture { whenStable(): Promise; } +/** @experimental */ export declare var ComponentFixtureAutoDetect: OpaqueToken; +/** @experimental */ export declare var ComponentFixtureNoNgZone: OpaqueToken; /** @deprecated */ @@ -38,11 +43,13 @@ export declare var ddescribe: any; /** @deprecated */ export declare var describe: Function; +/** @experimental */ export declare function discardPeriodicTasks(): void; /** @deprecated */ export declare var expect: Function; +/** @experimental */ export declare function fakeAsync(fn: Function): (...args: any[]) => any; /** @deprecated */ @@ -51,15 +58,19 @@ export declare var fdescribe: any; /** @deprecated */ export declare var fit: any; +/** @experimental */ export declare function flushMicrotasks(): void; +/** @experimental */ export declare function getTestInjector(): TestInjector; /** @deprecated */ export declare var iit: any; +/** @stable */ export declare function inject(tokens: any[], fn: Function): () => any; +/** @experimental */ export declare class InjectSetupWrapper { constructor(_providers: () => any); inject(tokens: any[], fn: Function): () => any; @@ -68,10 +79,13 @@ export declare class InjectSetupWrapper { /** @deprecated */ export declare var it: any; +/** @experimental */ export declare function resetBaseTestProviders(): void; +/** @experimental */ export declare function setBaseTestProviders(platformProviders: Array, applicationProviders: Array): void; +/** @stable */ export declare class TestComponentBuilder { protected _injector: Injector; constructor(_injector: Injector); @@ -87,10 +101,12 @@ export declare class TestComponentBuilder { overrideViewProviders(type: Type, providers: any[]): TestComponentBuilder; } +/** @experimental */ export declare class TestComponentRenderer { insertRootElement(rootElementId: string): void; } +/** @experimental */ export declare class TestInjector { applicationProviders: Array; platformProviders: Array; @@ -101,8 +117,10 @@ export declare class TestInjector { reset(): void; } +/** @experimental */ export declare function tick(millis?: number): void; +/** @experimental */ export declare function withProviders(providers: () => any): InjectSetupWrapper; /** @deprecated */ diff --git a/tools/public_api_guard/forms/index.d.ts b/tools/public_api_guard/forms/index.d.ts index 23a6e566db..36ff9f76ce 100644 --- a/tools/public_api_guard/forms/index.d.ts +++ b/tools/public_api_guard/forms/index.d.ts @@ -60,6 +60,7 @@ export declare abstract class AbstractControlDirective { valueChanges: Observable; } +/** @experimental */ export interface AsyncValidatorFn { (c: AbstractControl): any; } @@ -98,6 +99,7 @@ export declare class DefaultValueAccessor implements ControlValueAccessor { writeValue(value: any): void; } +/** @experimental */ export declare function disableDeprecatedForms(): any[]; /** @experimental */ @@ -114,6 +116,7 @@ export interface Form { /** @experimental */ export declare const FORM_DIRECTIVES: Type[]; +/** @experimental */ export declare const FORM_PROVIDERS: Type[]; /** @experimental */ @@ -352,8 +355,10 @@ export declare class PatternValidator implements Validator { }; } +/** @experimental */ export declare function provideForms(): any[]; +/** @experimental */ export declare const REACTIVE_FORM_DIRECTIVES: Type[]; /** @experimental */ @@ -371,12 +376,14 @@ export declare class SelectControlValueAccessor implements ControlValueAccessor writeValue(value: any): void; } +/** @experimental */ export interface Validator { validate(c: AbstractControl): { [key: string]: any; }; } +/** @experimental */ export interface ValidatorFn { (c: AbstractControl): { [key: string]: any; diff --git a/tools/public_api_guard/http/index.d.ts b/tools/public_api_guard/http/index.d.ts index b396a9839e..d9a18d5279 100644 --- a/tools/public_api_guard/http/index.d.ts +++ b/tools/public_api_guard/http/index.d.ts @@ -1,31 +1,38 @@ +/** @experimental */ export declare class BaseRequestOptions extends RequestOptions { constructor(); } +/** @experimental */ export declare class BaseResponseOptions extends ResponseOptions { constructor(); } +/** @experimental */ export declare class BrowserXhr { constructor(); build(): any; } +/** @experimental */ export declare abstract class Connection { readyState: ReadyState; request: Request; response: any; } +/** @experimental */ export declare abstract class ConnectionBackend { abstract createConnection(request: any): Connection; } +/** @experimental */ export declare class CookieXSRFStrategy implements XSRFStrategy { constructor(_cookieName?: string, _headerName?: string); configureRequest(req: Request): void; } +/** @experimental */ export declare class Headers { constructor(headers?: Headers | { [key: string]: any; @@ -46,6 +53,7 @@ export declare class Headers { static fromResponseHeaderString(headersString: string): Headers; } +/** @experimental */ export declare class Http { protected _backend: ConnectionBackend; protected _defaultOptions: RequestOptions; @@ -62,23 +70,29 @@ export declare class Http { /** @deprecated */ export declare const HTTP_BINDINGS: any[]; +/** @experimental */ export declare const HTTP_PROVIDERS: any[]; +/** @experimental */ export declare function httpFactory(xhrBackend: XHRBackend, requestOptions: RequestOptions): Http; /** @deprecated */ export declare const JSON_BINDINGS: any[]; +/** @experimental */ export declare class Jsonp extends Http { constructor(backend: ConnectionBackend, defaultOptions: RequestOptions); request(url: string | Request, options?: RequestOptionsArgs): Observable; } +/** @experimental */ export declare const JSONP_PROVIDERS: any[]; +/** @experimental */ export declare abstract class JSONPBackend extends ConnectionBackend { } +/** @experimental */ export declare abstract class JSONPConnection implements Connection { readyState: ReadyState; request: Request; @@ -86,6 +100,7 @@ export declare abstract class JSONPConnection implements Connection { abstract finished(data?: any): void; } +/** @experimental */ export declare enum ReadyState { Unsent = 0, Open = 1, @@ -95,6 +110,7 @@ export declare enum ReadyState { Cancelled = 5, } +/** @experimental */ export declare class Request { headers: Headers; method: RequestMethod; @@ -109,6 +125,7 @@ export declare class Request { text(): string; } +/** @experimental */ export declare enum RequestMethod { Get = 0, Post = 1, @@ -119,6 +136,7 @@ export declare enum RequestMethod { Patch = 6, } +/** @experimental */ export declare class RequestOptions { body: any; headers: Headers; @@ -130,6 +148,7 @@ export declare class RequestOptions { merge(options?: RequestOptionsArgs): RequestOptions; } +/** @experimental */ export interface RequestOptionsArgs { body?: any; headers?: Headers; @@ -139,6 +158,7 @@ export interface RequestOptionsArgs { withCredentials?: boolean; } +/** @experimental */ export declare class Response { bytesLoaded: number; headers: Headers; @@ -156,6 +176,7 @@ export declare class Response { toString(): string; } +/** @experimental */ export declare class ResponseOptions { body: string | Object; headers: Headers; @@ -165,6 +186,7 @@ export declare class ResponseOptions { merge(options?: ResponseOptionsArgs): ResponseOptions; } +/** @experimental */ export declare type ResponseOptionsArgs = { body?: string | Object | FormData; status?: number; @@ -174,6 +196,7 @@ export declare type ResponseOptionsArgs = { url?: string; }; +/** @experimental */ export declare enum ResponseType { Basic = 0, Cors = 1, @@ -182,6 +205,7 @@ export declare enum ResponseType { Opaque = 4, } +/** @experimental */ export declare class URLSearchParams { paramsMap: Map; rawParams: string; @@ -199,11 +223,13 @@ export declare class URLSearchParams { toString(): string; } +/** @experimental */ export declare class XHRBackend implements ConnectionBackend { constructor(_browserXHR: BrowserXhr, _baseResponseOptions: ResponseOptions, _xsrfStrategy: XSRFStrategy); createConnection(request: Request): XHRConnection; } +/** @experimental */ export declare class XHRConnection implements Connection { readyState: ReadyState; request: Request; @@ -212,6 +238,7 @@ export declare class XHRConnection implements Connection { setDetectedContentType(req: any, _xhr: any): void; } +/** @experimental */ export declare abstract class XSRFStrategy { abstract configureRequest(req: Request): void; } diff --git a/tools/public_api_guard/http/testing.d.ts b/tools/public_api_guard/http/testing.d.ts index 77237340f0..7aceb42af3 100644 --- a/tools/public_api_guard/http/testing.d.ts +++ b/tools/public_api_guard/http/testing.d.ts @@ -1,3 +1,4 @@ +/** @experimental */ export declare class MockBackend implements ConnectionBackend { connections: any; connectionsArray: MockConnection[]; @@ -8,6 +9,7 @@ export declare class MockBackend implements ConnectionBackend { verifyNoPendingRequests(): void; } +/** @experimental */ export declare class MockConnection implements Connection { readyState: ReadyState; request: Request; diff --git a/tools/public_api_guard/platform-browser-dynamic/index.d.ts b/tools/public_api_guard/platform-browser-dynamic/index.d.ts index a388730066..c91e85811d 100644 --- a/tools/public_api_guard/platform-browser-dynamic/index.d.ts +++ b/tools/public_api_guard/platform-browser-dynamic/index.d.ts @@ -1,3 +1,4 @@ +/** @experimental */ export declare function bootstrap(appComponentType: Type, customProviders?: Array): Promise>; /** @experimental */ @@ -6,6 +7,8 @@ export declare function bootstrapWorkerApp(appComponentType: Type, customProvide /** @experimental */ export declare function bootstrapWorkerUi(workerScriptUri: string, customProviders?: Array): Promise; +/** @experimental */ export declare const BROWSER_APP_COMPILER_PROVIDERS: Array; +/** @experimental */ export declare const CACHED_TEMPLATE_PROVIDER: Array; diff --git a/tools/public_api_guard/platform-browser-dynamic/testing.d.ts b/tools/public_api_guard/platform-browser-dynamic/testing.d.ts index f6aaf2cefa..c43fe0b985 100644 --- a/tools/public_api_guard/platform-browser-dynamic/testing.d.ts +++ b/tools/public_api_guard/platform-browser-dynamic/testing.d.ts @@ -1,3 +1,5 @@ +/** @stable */ export declare const TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS: Array; +/** @stable */ export declare const TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS: Array; diff --git a/tools/public_api_guard/platform-browser/index.d.ts b/tools/public_api_guard/platform-browser/index.d.ts index a9e05b81f1..8fd3640686 100644 --- a/tools/public_api_guard/platform-browser/index.d.ts +++ b/tools/public_api_guard/platform-browser/index.d.ts @@ -1,13 +1,16 @@ +/** @experimental */ export declare const BROWSER_APP_PROVIDERS: Array; +/** @experimental */ export declare const BROWSER_PLATFORM_PROVIDERS: Array; -export declare const BROWSER_PROVIDERS: any[]; - +/** @experimental */ export declare const BROWSER_SANITIZATION_PROVIDERS: Array; +/** @experimental */ export declare function browserPlatform(): PlatformRef; +/** @stable */ export declare class BrowserPlatformLocation extends PlatformLocation { hash: string; pathname: string; @@ -22,6 +25,7 @@ export declare class BrowserPlatformLocation extends PlatformLocation { replaceState(state: any, title: string, url: string): void; } +/** @experimental */ export declare class By { static all(): Predicate; static css(selector: string): Predicate; @@ -38,16 +42,13 @@ export declare abstract class ClientMessageBrokerFactory { abstract createMessageBroker(channel: string, runInZone?: boolean): ClientMessageBroker; } +/** @experimental */ export declare function disableDebugTools(): void; +/** @stable */ export declare const DOCUMENT: OpaqueToken; -export declare class DomEventsPlugin extends EventManagerPlugin { - addEventListener(element: HTMLElement, eventName: string, handler: Function): Function; - addGlobalEventListener(target: string, eventName: string, handler: Function): Function; - supports(eventName: string): boolean; -} - +/** @stable */ export declare abstract class DomSanitizationService implements SanitizationService { abstract bypassSecurityTrustHtml(value: string): SafeHtml; abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl; @@ -57,12 +58,13 @@ export declare abstract class DomSanitizationService implements SanitizationServ abstract sanitize(context: SecurityContext, value: any): string; } -export declare const ELEMENT_PROBE_PROVIDERS: any[]; - +/** @experimental */ export declare function enableDebugTools(ref: ComponentRef): ComponentRef; +/** @stable */ export declare const EVENT_MANAGER_PLUGINS: OpaqueToken; +/** @stable */ export declare class EventManager { constructor(plugins: EventManagerPlugin[], _zone: NgZone); addEventListener(element: HTMLElement, eventName: string, handler: Function): Function; @@ -77,8 +79,10 @@ export declare class FnArg { constructor(value: any, type: Type); } +/** @experimental */ export declare const HAMMER_GESTURE_CONFIG: OpaqueToken; +/** @experimental */ export declare class HammerGestureConfig { events: string[]; overrides: { @@ -87,17 +91,6 @@ export declare class HammerGestureConfig { buildHammer(element: HTMLElement): HammerInstance; } -export declare class KeyEventsPlugin extends EventManagerPlugin { - constructor(); - addEventListener(element: HTMLElement, eventName: string, handler: Function): Function; - supports(eventName: string): boolean; - static eventCallback(element: HTMLElement, fullKey: any, handler: Function, zone: NgZone): Function; - static getEventFullKey(event: KeyboardEvent): string; - static parseEventName(eventName: string): { - [key: string]: string; - }; -} - /** @experimental */ export declare abstract class MessageBus implements MessageBusSource, MessageBusSink { abstract attachToZone(zone: NgZone): void; @@ -134,21 +127,27 @@ export declare class ReceivedMessage { }); } +/** @stable */ export interface SafeHtml extends SafeValue { } +/** @stable */ export interface SafeResourceUrl extends SafeValue { } +/** @stable */ export interface SafeScript extends SafeValue { } +/** @stable */ export interface SafeStyle extends SafeValue { } +/** @stable */ export interface SafeUrl extends SafeValue { } +/** @experimental */ export declare var SecurityContext: typeof t.SecurityContext; /** @experimental */ @@ -156,6 +155,7 @@ export declare abstract class ServiceMessageBroker { abstract registerMethod(methodName: string, signature: Type[], method: Function, returnType?: Type): void; } +/** @experimental */ export declare abstract class ServiceMessageBrokerFactory { abstract createMessageBroker(channel: string, runInZone?: boolean): ServiceMessageBroker; } diff --git a/tools/public_api_guard/platform-browser/testing.d.ts b/tools/public_api_guard/platform-browser/testing.d.ts index dbed2b6823..7671383028 100644 --- a/tools/public_api_guard/platform-browser/testing.d.ts +++ b/tools/public_api_guard/platform-browser/testing.d.ts @@ -1,3 +1,5 @@ +/** @stable */ export declare const TEST_BROWSER_APPLICATION_PROVIDERS: Array; +/** @stable */ export declare const TEST_BROWSER_PLATFORM_PROVIDERS: Array; diff --git a/tools/public_api_guard/platform-browser/testing_e2e.d.ts b/tools/public_api_guard/platform-browser/testing_e2e.d.ts index 0139c20403..c554640a52 100644 --- a/tools/public_api_guard/platform-browser/testing_e2e.d.ts +++ b/tools/public_api_guard/platform-browser/testing_e2e.d.ts @@ -1 +1,2 @@ +/** @experimental */ export declare function verifyNoBrowserErrors(): void; diff --git a/tools/public_api_guard/platform-server/testing.d.ts b/tools/public_api_guard/platform-server/testing.d.ts index 83926fae53..97bba15f09 100644 --- a/tools/public_api_guard/platform-server/testing.d.ts +++ b/tools/public_api_guard/platform-server/testing.d.ts @@ -1,3 +1,5 @@ +/** @experimental */ export declare const TEST_SERVER_APPLICATION_PROVIDERS: Array; +/** @experimental */ export declare const TEST_SERVER_PLATFORM_PROVIDERS: Array; diff --git a/tools/public_api_guard/router/index.d.ts b/tools/public_api_guard/router/index.d.ts index acc823d2aa..db3c08ef39 100644 --- a/tools/public_api_guard/router/index.d.ts +++ b/tools/public_api_guard/router/index.d.ts @@ -1,3 +1,4 @@ +/** @experimental */ export declare class ActivatedRoute { component: Type | string; data: Observable; @@ -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; } +/** @experimental */ export interface CanDeactivate { canDeactivate(component: T, route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | 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 { resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | 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; 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 { fragment: Observable; queryParams: Observable; @@ -118,6 +141,7 @@ export declare class RouterState extends Tree { toString(): string; } +/** @experimental */ export declare class RouterStateSnapshot extends Tree { fragment: string; queryParams: Params; @@ -125,6 +149,7 @@ export declare class RouterStateSnapshot extends Tree { 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: { diff --git a/tools/public_api_guard/upgrade/index.d.ts b/tools/public_api_guard/upgrade/index.d.ts index 0777067db4..9eb8d43d67 100644 --- a/tools/public_api_guard/upgrade/index.d.ts +++ b/tools/public_api_guard/upgrade/index.d.ts @@ -1,3 +1,4 @@ +/** @experimental */ export declare class UpgradeAdapter { addProvider(provider: Type | Provider | any[] | any): void; bootstrap(element: Element, modules?: any[], config?: angular.IAngularBootstrapConfig): UpgradeAdapterRef; @@ -9,6 +10,7 @@ export declare class UpgradeAdapter { }): void; } +/** @experimental */ export declare class UpgradeAdapterRef { ng1Injector: angular.IInjectorService; ng1RootScope: angular.IRootScopeService;