From 39ecd01b8684370666586ba35a4a12c0f109807d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=A1ko=20Hevery?= Date: Wed, 25 May 2016 15:00:05 -0700 Subject: [PATCH] chore: audit @angular/core API classification (#8808) --- modules/@angular/compiler/core_private.ts | 3 +- .../@angular/compiler/src/compile_metadata.ts | 3 +- .../src/directive_lifecycle_reflector.ts | 3 +- .../compiler/src/directive_resolver.ts | 3 +- .../compiler/src/metadata_resolver.ts | 5 +- .../compiler/src/output/output_interpreter.ts | 2 +- .../@angular/compiler/src/pipe_resolver.ts | 4 +- .../@angular/compiler/src/view_resolver.ts | 3 +- .../@angular/compiler_cli/src/core_private.ts | 2 + .../src/static_reflection_capabilities.ts | 5 +- modules/@angular/core/index.ts | 1 - modules/@angular/core/private_export.ts | 7 + .../core/src/application_common_providers.ts | 1 + modules/@angular/core/src/application_ref.ts | 9 + .../@angular/core/src/application_tokens.ts | 5 + .../change_detection/change_detection_util.ts | 2 + .../change_detection/change_detector_ref.ts | 3 + .../core/src/change_detection/constants.ts | 1 + .../differs/default_iterable_differ.ts | 6 + .../differs/default_keyvalue_differ.ts | 3 + .../differs/iterable_differs.ts | 3 + .../differs/keyvalue_differs.ts | 1 + modules/@angular/core/src/debug/debug_node.ts | 12 + modules/@angular/core/src/di.ts | 6 +- modules/@angular/core/src/di/decorators.dart | 6 + modules/@angular/core/src/di/decorators.ts | 12 + modules/@angular/core/src/di/forward_ref.ts | 2 + modules/@angular/core/src/di/injector.ts | 3 + modules/@angular/core/src/di/metadata.ts | 7 + modules/@angular/core/src/di/opaque_token.ts | 1 + modules/@angular/core/src/di/provider.ts | 3 + .../core/src/di/reflective_exceptions.ts | 7 + .../core/src/di/reflective_injector.ts | 1 + .../@angular/core/src/di/reflective_key.ts | 1 + .../core/src/di/reflective_provider.ts | 1 + .../core/src/linker/component_factory.ts | 8 +- .../core/src/linker/component_resolver.ts | 1 + .../@angular/core/src/linker/element_ref.ts | 1 + .../@angular/core/src/linker/exceptions.ts | 3 + .../@angular/core/src/linker/query_list.ts | 1 + .../src/linker/systemjs_component_resolver.ts | 1 + .../@angular/core/src/linker/template_ref.ts | 1 + .../core/src/linker/view_container_ref.ts | 1 + modules/@angular/core/src/linker/view_ref.ts | 4 + modules/@angular/core/src/metadata.dart | 17 +- modules/@angular/core/src/metadata.ts | 25 + modules/@angular/core/src/metadata/di.ts | 7 + .../@angular/core/src/metadata/directives.ts | 7 + .../core/src/metadata/lifecycle_hooks.ts | 12 + modules/@angular/core/src/metadata/view.ts | 1 + .../core/src/platform_common_providers.ts | 1 + .../core/src/platform_directives_and_pipes.ts | 2 + modules/@angular/core/src/profile/profile.ts | 4 + modules/@angular/core/src/render/api.ts | 8 +- .../core/src/testability/testability.ts | 3 + modules/@angular/core/src/util/decorators.ts | 1 + modules/@angular/core/src/zone/ng_zone.ts | 1 + .../@angular/core/src/zone/ng_zone_impl.ts | 1 + modules/@angular/facade/src/async.ts | 1 + .../@angular/facade/src/exception_handler.ts | 1 + modules/@angular/facade/src/exceptions.ts | 4 + modules/@angular/facade/src/lang.js | 470 ------------------ modules/@angular/facade/src/lang.ts | 1 + .../integration_test/public_api_spec.ts | 38 +- .../@angular/platform-browser/core_private.ts | 1 + .../router-deprecated/core_private.ts | 5 +- .../lifecycle/route_lifecycle_reflector.ts | 2 +- .../router-deprecated/src/route_registry.ts | 3 +- modules/@angular/router/src/core_private.ts | 5 +- .../router/src/directives/router_link.ts | 21 +- .../router/src/directives/router_outlet.ts | 4 +- modules/@angular/router/src/recognize.ts | 2 +- 72 files changed, 245 insertions(+), 561 deletions(-) delete mode 100644 modules/@angular/facade/src/lang.js diff --git a/modules/@angular/compiler/core_private.ts b/modules/@angular/compiler/core_private.ts index de7757bd35..f63d28e797 100644 --- a/modules/@angular/compiler/core_private.ts +++ b/modules/@angular/compiler/core_private.ts @@ -58,7 +58,8 @@ export var pureProxy10: typeof t.pureProxy10 = r.pureProxy10; export var castByValue: typeof t.castByValue = r.castByValue; export type Console = t.Console; export var Console: typeof t.Console = r.Console; - +export var reflector: t.Reflector = r.reflector; +export type Reflector = t.Reflector; export type NoOpAnimationPlayer = t.NoOpAnimationPlayer; export var NoOpAnimationPlayer: typeof t.NoOpAnimationPlayer = r.NoOpAnimationPlayer; export type AnimationPlayer = t.AnimationPlayer; diff --git a/modules/@angular/compiler/src/compile_metadata.ts b/modules/@angular/compiler/src/compile_metadata.ts index 4f961741b3..ae7ad7df47 100644 --- a/modules/@angular/compiler/src/compile_metadata.ts +++ b/modules/@angular/compiler/src/compile_metadata.ts @@ -1,4 +1,5 @@ -import {ChangeDetectionStrategy, ViewEncapsulation, reflector} from '@angular/core'; +import {ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core'; +import {reflector} from '../core_private'; import { CHANGE_DETECTION_STRATEGY_VALUES, VIEW_ENCAPSULATION_VALUES, diff --git a/modules/@angular/compiler/src/directive_lifecycle_reflector.ts b/modules/@angular/compiler/src/directive_lifecycle_reflector.ts index 88d97b4066..db7db64c4f 100644 --- a/modules/@angular/compiler/src/directive_lifecycle_reflector.ts +++ b/modules/@angular/compiler/src/directive_lifecycle_reflector.ts @@ -7,9 +7,8 @@ import { AfterContentChecked, AfterViewInit, AfterViewChecked, - reflector } from '@angular/core'; -import {LifecycleHooks} from '../core_private'; +import {reflector, LifecycleHooks} from '../core_private'; import {Type} from '../src/facade/lang'; import {MapWrapper} from '../src/facade/collection'; diff --git a/modules/@angular/compiler/src/directive_resolver.ts b/modules/@angular/compiler/src/directive_resolver.ts index cfcb2c1d49..19174373d6 100644 --- a/modules/@angular/compiler/src/directive_resolver.ts +++ b/modules/@angular/compiler/src/directive_resolver.ts @@ -11,9 +11,8 @@ import { ViewChildrenMetadata, ContentChildMetadata, ViewChildMetadata, - reflector } from '@angular/core'; -import {ReflectorReader} from '../core_private'; +import {ReflectorReader, reflector} from '../core_private'; import {Type, isPresent, stringify} from '../src/facade/lang'; import {BaseException} from '../src/facade/exceptions'; diff --git a/modules/@angular/compiler/src/metadata_resolver.ts b/modules/@angular/compiler/src/metadata_resolver.ts index aa4de38fb2..4f717d138f 100644 --- a/modules/@angular/compiler/src/metadata_resolver.ts +++ b/modules/@angular/compiler/src/metadata_resolver.ts @@ -1,6 +1,5 @@ import { AttributeMetadata, - ReflectiveDependency, OptionalMetadata, ComponentMetadata, SelfMetadata, @@ -9,18 +8,16 @@ import { Provider, PLATFORM_DIRECTIVES, PLATFORM_PIPES, - reflector, Injectable, Inject, Optional, ViewMetadata, - NoAnnotationError, QueryMetadata, resolveForwardRef, InjectMetadata, ViewQueryMetadata } from '@angular/core'; -import {constructDependencies, LIFECYCLE_HOOKS_VALUES, ReflectorReader} from '../core_private'; +import {LIFECYCLE_HOOKS_VALUES, ReflectorReader, reflector} from '../core_private'; import { Type, isBlank, diff --git a/modules/@angular/compiler/src/output/output_interpreter.ts b/modules/@angular/compiler/src/output/output_interpreter.ts index 5d8f826edc..11aacd80cd 100644 --- a/modules/@angular/compiler/src/output/output_interpreter.ts +++ b/modules/@angular/compiler/src/output/output_interpreter.ts @@ -1,4 +1,4 @@ -import {reflector} from '@angular/core'; +import {reflector} from '../../core_private'; import {isPresent, IS_DART, FunctionWrapper} from '../../src/facade/lang'; import {ObservableWrapper} from '../../src/facade/async'; import {BaseException, unimplemented} from '../../src/facade/exceptions'; diff --git a/modules/@angular/compiler/src/pipe_resolver.ts b/modules/@angular/compiler/src/pipe_resolver.ts index 5d47ceed01..fe56da4719 100644 --- a/modules/@angular/compiler/src/pipe_resolver.ts +++ b/modules/@angular/compiler/src/pipe_resolver.ts @@ -1,6 +1,6 @@ -import {resolveForwardRef, Injectable, PipeMetadata, reflector} from '@angular/core'; +import {resolveForwardRef, Injectable, PipeMetadata} from '@angular/core'; -import {ReflectorReader} from '../core_private'; +import {ReflectorReader, reflector} from '../core_private'; import {Type, isPresent, stringify} from '../src/facade/lang'; import {BaseException} from '../src/facade/exceptions'; diff --git a/modules/@angular/compiler/src/view_resolver.ts b/modules/@angular/compiler/src/view_resolver.ts index ce905b08c0..baecfa139b 100644 --- a/modules/@angular/compiler/src/view_resolver.ts +++ b/modules/@angular/compiler/src/view_resolver.ts @@ -2,10 +2,9 @@ import { Injectable, ViewMetadata, ComponentMetadata, - reflector, } from '@angular/core'; -import {ReflectorReader} from '../core_private'; +import {ReflectorReader, reflector} from '../core_private'; import {Type, stringify, isBlank, isPresent} from '../src/facade/lang'; import {BaseException} from '../src/facade/exceptions'; diff --git a/modules/@angular/compiler_cli/src/core_private.ts b/modules/@angular/compiler_cli/src/core_private.ts index c2a9ec2f38..9f0e9f69ff 100644 --- a/modules/@angular/compiler_cli/src/core_private.ts +++ b/modules/@angular/compiler_cli/src/core_private.ts @@ -5,3 +5,5 @@ export var ReflectorReader: typeof t.ReflectorReader = r.ReflectorReader; export type ReflectionCapabilities = t.ReflectionCapabilities; export var ReflectionCapabilities: typeof t.ReflectionCapabilities = r.ReflectionCapabilities; + +export var reflector: typeof t.reflector = r.reflector; diff --git a/modules/@angular/compiler_cli/src/static_reflection_capabilities.ts b/modules/@angular/compiler_cli/src/static_reflection_capabilities.ts index ab40bbed91..f0d7cb1c8b 100644 --- a/modules/@angular/compiler_cli/src/static_reflection_capabilities.ts +++ b/modules/@angular/compiler_cli/src/static_reflection_capabilities.ts @@ -1,5 +1,4 @@ -import {reflector} from '@angular/core'; -import {ReflectionCapabilities} from './core_private'; +import {ReflectionCapabilities, reflector} from './core_private'; import {StaticReflector} from './static_reflector'; export class StaticAndDynamicReflectionCapabilities { @@ -39,4 +38,4 @@ export class StaticAndDynamicReflectionCapabilities { function isStaticType(type: any): boolean { return typeof type === 'object' && type.name && type.filePath; -} \ No newline at end of file +} diff --git a/modules/@angular/core/index.ts b/modules/@angular/core/index.ts index b35e4e5736..c58361073d 100644 --- a/modules/@angular/core/index.ts +++ b/modules/@angular/core/index.ts @@ -32,7 +32,6 @@ export * from './src/change_detection'; export * from './src/platform_directives_and_pipes'; export * from './src/platform_common_providers'; export * from './src/application_common_providers'; -export * from './src/reflection/reflection'; export { wtfCreateScope, wtfLeave, diff --git a/modules/@angular/core/private_export.ts b/modules/@angular/core/private_export.ts index d5382cc3bb..6d8ea5d1bf 100644 --- a/modules/@angular/core/private_export.ts +++ b/modules/@angular/core/private_export.ts @@ -20,6 +20,8 @@ import * as debug from './src/debug/debug_renderer'; import * as provider_util from './src/di/provider_util'; import * as console from './src/console'; import {Provider} from './index'; +import * as reflection from './src/reflection/reflection'; +import {Reflector} from './src/reflection/reflection'; import { NoOpAnimationPlayer as NoOpAnimationPlayer_, @@ -103,6 +105,9 @@ export declare namespace __core_private_types__ { export var castByValue: typeof view_utils.castByValue; export type Console = console.Console; export var Console: typeof console.Console; + export var reflector: typeof reflection.reflector; + export type Reflector = reflection.Reflector; + export var Reflector: typeof reflection.Reflector; export type NoOpAnimationPlayer = NoOpAnimationPlayer_; export var NoOpAnimationPlayer: typeof NoOpAnimationPlayer_; export type AnimationPlayer = AnimationPlayer_; @@ -178,6 +183,8 @@ export var __core_private__ = { pureProxy10: view_utils.pureProxy10, castByValue: view_utils.castByValue, Console: console.Console, + reflector: reflection.reflector, + Reflector: reflection.Reflector, NoOpAnimationPlayer: NoOpAnimationPlayer_, AnimationPlayer: AnimationPlayer_, NoOpAnimationDriver: NoOpAnimationDriver_, diff --git a/modules/@angular/core/src/application_common_providers.ts b/modules/@angular/core/src/application_common_providers.ts index 62c5b55c4c..dd834379b1 100644 --- a/modules/@angular/core/src/application_common_providers.ts +++ b/modules/@angular/core/src/application_common_providers.ts @@ -16,6 +16,7 @@ let __unused: Type; // avoid unused import when Type union types are erased /** * A default set of providers which should be included in any Angular * application, regardless of the platform it runs onto. + * @stable */ export const APPLICATION_COMMON_PROVIDERS: Array = /*@ts2dart_const*/[ diff --git a/modules/@angular/core/src/application_ref.ts b/modules/@angular/core/src/application_ref.ts index 0720c421c9..a9145a4d32 100644 --- a/modules/@angular/core/src/application_ref.ts +++ b/modules/@angular/core/src/application_ref.ts @@ -14,6 +14,7 @@ import {ChangeDetectorRef} from './change_detection/change_detector_ref'; /** * Create an Angular zone. + * @experimental */ export function createNgZone(): NgZone { return new NgZone({enableLongStackTrace: assertionsEnabled()}); @@ -25,6 +26,7 @@ var _inPlatformCreate: boolean = false; /** * Creates a platform. * Platforms have to be eagerly created via this function. + * @experimental */ export function createPlatform(injector: Injector): PlatformRef { if (_inPlatformCreate) { @@ -47,6 +49,7 @@ export function createPlatform(injector: Injector): PlatformRef { /** * Checks that there currently is a platform * which contains the given token as a provider. + * @experimental */ export function assertPlatform(requiredToken: any): PlatformRef { var platform = getPlatform(); @@ -62,6 +65,7 @@ export function assertPlatform(requiredToken: any): PlatformRef { /** * Dispose the existing platform. + * @experimental */ export function disposePlatform(): void { if (isPresent(_platform) && !_platform.disposed) { @@ -71,6 +75,7 @@ export function disposePlatform(): void { /** * Returns the current platform. + * @experimental */ export function getPlatform(): PlatformRef { return isPresent(_platform) && !_platform.disposed ? _platform : null; @@ -79,6 +84,7 @@ export function getPlatform(): PlatformRef { /** * Shortcut for ApplicationRef.bootstrap. * Requires a platform to be created first. + * @experimental */ export function coreBootstrap(componentFactory: ComponentFactory, injector: Injector): ComponentRef { @@ -90,6 +96,7 @@ export function coreBootstrap(componentFactory: ComponentFactory, * Resolves the componentFactory for the given component, * waits for asynchronous initializers and bootstraps the component. * Requires a platform to be created first. + * @experimental */ export function coreLoadAndBootstrap(componentType: Type, injector: Injector): Promise> { @@ -109,6 +116,7 @@ export function coreLoadAndBootstrap(componentType: Type, * * A page's platform is initialized implicitly when {@link bootstrap}() is called, or * explicitly by calling {@link createPlatform}(). + * @stable */ export abstract class PlatformRef { /** @@ -170,6 +178,7 @@ 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 */ export abstract class ApplicationRef { /** diff --git a/modules/@angular/core/src/application_tokens.ts b/modules/@angular/core/src/application_tokens.ts index d9dd03717f..1964562976 100644 --- a/modules/@angular/core/src/application_tokens.ts +++ b/modules/@angular/core/src/application_tokens.ts @@ -9,6 +9,7 @@ import {Math, StringWrapper} from '../src/facade/lang'; * If you need to avoid randomly generated value to be used as an application id, you can provide * a custom value via a DI provider configuring the root {@link Injector} * using this token. + * @experimental */ export const APP_ID: any = /*@ts2dart_const*/ new OpaqueToken('AppId'); @@ -18,6 +19,7 @@ function _appIdRandomProviderFactory() { /** * Providers that will generate a random APP_ID_TOKEN. + * @experimental */ export const APP_ID_RANDOM_PROVIDER = /*@ts2dart_const*/ /* @ts2dart_Provider */ { @@ -32,18 +34,21 @@ function _randomChar(): string { /** * A function that will be executed when a platform is initialized. + * @experimental */ export const PLATFORM_INITIALIZER: any = /*@ts2dart_const*/ new OpaqueToken("Platform Initializer"); /** * A function that will be executed when an application is initialized. + * @experimental */ export const APP_INITIALIZER: any = /*@ts2dart_const*/ new OpaqueToken("Application Initializer"); /** * A token which indicates the root directory of the application + * @experimental */ export const PACKAGE_ROOT_URL: any = /*@ts2dart_const*/ new OpaqueToken("Application Packages Root URL"); diff --git a/modules/@angular/core/src/change_detection/change_detection_util.ts b/modules/@angular/core/src/change_detection/change_detection_util.ts index 888b678886..f827d6a68b 100644 --- a/modules/@angular/core/src/change_detection/change_detection_util.ts +++ b/modules/@angular/core/src/change_detection/change_detection_util.ts @@ -34,6 +34,7 @@ export function devModeEqual(a: any, b: any): boolean { * return WrappedValue.wrap(this._latestValue); // this will force update * } * ``` + * @stable */ export class WrappedValue { constructor(public wrapped: any) {} @@ -60,6 +61,7 @@ export class ValueUnwrapper { /** * Represents a basic change from a previous to a new value. + * @stable */ export class SimpleChange { constructor(public previousValue: any, public currentValue: any) {} diff --git a/modules/@angular/core/src/change_detection/change_detector_ref.ts b/modules/@angular/core/src/change_detection/change_detector_ref.ts index c218719873..8ae682db84 100644 --- a/modules/@angular/core/src/change_detection/change_detector_ref.ts +++ b/modules/@angular/core/src/change_detection/change_detector_ref.ts @@ -1,3 +1,6 @@ +/** + * @stable + */ export abstract class ChangeDetectorRef { /** * Marks all {@link ChangeDetectionStrategy#OnPush} ancestors as to be checked. diff --git a/modules/@angular/core/src/change_detection/constants.ts b/modules/@angular/core/src/change_detection/constants.ts index ee7d3fc037..ea0ac9efa9 100644 --- a/modules/@angular/core/src/change_detection/constants.ts +++ b/modules/@angular/core/src/change_detection/constants.ts @@ -28,6 +28,7 @@ export enum ChangeDetectorState { /** * Describes within the change detector which strategy will be used the next time change * detection is triggered. + * @stable */ export enum ChangeDetectionStrategy { /** diff --git a/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts b/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts index 93cda5bc70..cc0fc02f2f 100644 --- a/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts +++ b/modules/@angular/core/src/change_detection/differs/default_iterable_differ.ts @@ -24,6 +24,9 @@ export class DefaultIterableDifferFactory implements IterableDifferFactory { var trackByIdentity = (index: number, item: any) => item; +/** + * @stable + */ export class DefaultIterableDiffer implements IterableDiffer { private _length: number = null; private _collection = null; @@ -532,6 +535,9 @@ export class DefaultIterableDiffer implements IterableDiffer { } } +/** + * @stable + */ export class CollectionChangeRecord { currentIndex: number = null; previousIndex: number = null; diff --git a/modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.ts b/modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.ts index 1b3a9ab545..6ca8d454cb 100644 --- a/modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.ts +++ b/modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.ts @@ -335,6 +335,9 @@ export class DefaultKeyValueDiffer implements KeyValueDiffer { } +/** + * @stable + */ export class KeyValueChangeRecord { previousValue: any = null; currentValue: any = null; 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 d88d5e205f..6777066614 100644 --- a/modules/@angular/core/src/change_detection/differs/iterable_differs.ts +++ b/modules/@angular/core/src/change_detection/differs/iterable_differs.ts @@ -7,6 +7,8 @@ import {Provider, SkipSelfMetadata, OptionalMetadata} from '../../di'; /** * A strategy for tracking changes over time to an iterable. Used for {@link NgFor} to * respond to changes in an iterable by effecting equivalent changes in the DOM. + * + * @stable */ export interface IterableDiffer { diff(object: any): any; @@ -31,6 +33,7 @@ export interface IterableDifferFactory { /** * A repository of different iterable diffing strategies used by NgFor, NgClass, and others. * @ts2dart_const + * @stable */ export class IterableDiffers { /*@ts2dart_const*/ 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 3d132e875e..6bfa77496d 100644 --- a/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts +++ b/modules/@angular/core/src/change_detection/differs/keyvalue_differs.ts @@ -23,6 +23,7 @@ export interface KeyValueDifferFactory { /** * A repository of different Map diffing strategies used by NgClass, NgStyle, and others. * @ts2dart_const + * @stable */ export class KeyValueDiffers { /*@ts2dart_const*/ diff --git a/modules/@angular/core/src/debug/debug_node.ts b/modules/@angular/core/src/debug/debug_node.ts index 08e644e4be..062596ab2d 100644 --- a/modules/@angular/core/src/debug/debug_node.ts +++ b/modules/@angular/core/src/debug/debug_node.ts @@ -5,6 +5,9 @@ import {RenderDebugInfo} from '../render/api'; export class EventListener { constructor(public name: string, public callback: Function){}; } +/** + * @experimental + */ export class DebugNode { nativeNode: any; listeners: EventListener[]; @@ -46,6 +49,9 @@ export class DebugNode { inject(token: any): any { return this.injector.get(token); } } +/** + * @experimental + */ export class DebugElement extends DebugNode { name: string; properties: {[key: string]: string}; @@ -129,6 +135,9 @@ export class DebugElement extends DebugNode { } } +/** + * @experimental + */ export function asNativeElements(debugEls: DebugElement[]): any { return debugEls.map((el) => el.nativeElement); } @@ -162,6 +171,9 @@ function _queryNodeChildren(parentNode: DebugNode, predicate: Predicate(); +/** + * @experimental + */ export function getDebugNode(nativeNode: any): DebugNode { return _nativeNodeToDebugNode.get(nativeNode); } diff --git a/modules/@angular/core/src/di.ts b/modules/@angular/core/src/di.ts index fcc23b29c1..e636d2322a 100644 --- a/modules/@angular/core/src/di.ts +++ b/modules/@angular/core/src/di.ts @@ -10,8 +10,7 @@ export { InjectableMetadata, SelfMetadata, HostMetadata, - SkipSelfMetadata, - DependencyMetadata + SkipSelfMetadata } from './di/metadata'; // we have to reexport * because Dart and TS export two different sets of types @@ -25,15 +24,12 @@ export { Binding, ProviderBuilder, bind, - Provider, provide } from './di/provider'; export { ResolvedReflectiveBinding, ResolvedReflectiveFactory, - ReflectiveDependency, - ResolvedReflectiveProvider } from './di/reflective_provider'; export {ReflectiveKey} from './di/reflective_key'; diff --git a/modules/@angular/core/src/di/decorators.dart b/modules/@angular/core/src/di/decorators.dart index ab7cf001a3..261f4a86c6 100644 --- a/modules/@angular/core/src/di/decorators.dart +++ b/modules/@angular/core/src/di/decorators.dart @@ -5,6 +5,7 @@ export 'metadata.dart'; /** * {@link InjectMetadata}. + * @stable */ class Inject extends InjectMetadata { const Inject(dynamic token) : super(token); @@ -12,6 +13,7 @@ class Inject extends InjectMetadata { /** * {@link OptionalMetadata}. + * @stable */ class Optional extends OptionalMetadata { const Optional() : super(); @@ -19,6 +21,7 @@ class Optional extends OptionalMetadata { /** * {@link InjectableMetadata}. + * @stable */ class Injectable extends InjectableMetadata { const Injectable() : super(); @@ -26,6 +29,7 @@ class Injectable extends InjectableMetadata { /** * {@link SelfMetadata}. + * @stable */ class Self extends SelfMetadata { const Self() : super(); @@ -33,6 +37,7 @@ class Self extends SelfMetadata { /** * {@link HostMetadata}. + * @stable */ class Host extends HostMetadata { const Host() : super(); @@ -40,6 +45,7 @@ class Host extends HostMetadata { /** * {@link SkipSelfMetadata}. + * @stable */ class SkipSelf extends SkipSelfMetadata { const SkipSelf() : super(); diff --git a/modules/@angular/core/src/di/decorators.ts b/modules/@angular/core/src/di/decorators.ts index 07bfd17031..262d7eebf4 100644 --- a/modules/@angular/core/src/di/decorators.ts +++ b/modules/@angular/core/src/di/decorators.ts @@ -10,6 +10,7 @@ import {makeDecorator, makeParamDecorator} from '../util/decorators'; /** * Factory for creating {@link InjectMetadata}. + * @stable */ export interface InjectMetadataFactory { (token: any): any; @@ -18,6 +19,7 @@ export interface InjectMetadataFactory { /** * Factory for creating {@link OptionalMetadata}. + * @stable */ export interface OptionalMetadataFactory { (): any; @@ -26,6 +28,7 @@ export interface OptionalMetadataFactory { /** * Factory for creating {@link InjectableMetadata}. + * @stable */ export interface InjectableMetadataFactory { (): any; @@ -34,6 +37,7 @@ export interface InjectableMetadataFactory { /** * Factory for creating {@link SelfMetadata}. + * @stable */ export interface SelfMetadataFactory { (): any; @@ -42,6 +46,7 @@ export interface SelfMetadataFactory { /** * Factory for creating {@link HostMetadata}. + * @stable */ export interface HostMetadataFactory { (): any; @@ -50,6 +55,7 @@ export interface HostMetadataFactory { /** * Factory for creating {@link SkipSelfMetadata}. + * @stable */ export interface SkipSelfMetadataFactory { (): any; @@ -58,31 +64,37 @@ export interface SkipSelfMetadataFactory { /** * Factory for creating {@link InjectMetadata}. + * @stable */ export var Inject: InjectMetadataFactory = makeParamDecorator(InjectMetadata); /** * Factory for creating {@link OptionalMetadata}. + * @stable */ export var Optional: OptionalMetadataFactory = makeParamDecorator(OptionalMetadata); /** * Factory for creating {@link InjectableMetadata}. + * @stable */ export var Injectable: InjectableMetadataFactory = makeDecorator(InjectableMetadata); /** * Factory for creating {@link SelfMetadata}. + * @stable */ export var Self: SelfMetadataFactory = makeParamDecorator(SelfMetadata); /** * Factory for creating {@link HostMetadata}. + * @stable */ export var Host: HostMetadataFactory = makeParamDecorator(HostMetadata); /** * Factory for creating {@link SkipSelfMetadata}. + * @stable */ export var SkipSelf: SkipSelfMetadataFactory = makeParamDecorator(SkipSelfMetadata); diff --git a/modules/@angular/core/src/di/forward_ref.ts b/modules/@angular/core/src/di/forward_ref.ts index 462807b3f7..83751003c6 100644 --- a/modules/@angular/core/src/di/forward_ref.ts +++ b/modules/@angular/core/src/di/forward_ref.ts @@ -19,6 +19,7 @@ export interface ForwardRefFn { (): any; } * * ### Example * {@example core/di/ts/forward_ref/forward_ref.ts region='forward_ref'} + * @experimental */ export function forwardRef(forwardRefFn: ForwardRefFn): Type { (forwardRefFn).__forward_ref__ = forwardRef; @@ -40,6 +41,7 @@ export function forwardRef(forwardRefFn: ForwardRefFn): Type { * ``` * * See: {@link forwardRef} + * @experimental */ export function resolveForwardRef(type: any): any { if (isFunction(type) && type.hasOwnProperty('__forward_ref__') && diff --git a/modules/@angular/core/src/di/injector.ts b/modules/@angular/core/src/di/injector.ts index 4339ecf41d..b7b459733e 100644 --- a/modules/@angular/core/src/di/injector.ts +++ b/modules/@angular/core/src/di/injector.ts @@ -3,6 +3,9 @@ import {unimplemented} from '../../src/facade/exceptions'; const _THROW_IF_NOT_FOUND = /*@ts2dart_const*/ new Object(); export const THROW_IF_NOT_FOUND = /*@ts2dart_const*/ _THROW_IF_NOT_FOUND; +/** + * @stable + */ export abstract class Injector { static THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND; diff --git a/modules/@angular/core/src/di/metadata.ts b/modules/@angular/core/src/di/metadata.ts index 6f834817a3..8b52152588 100644 --- a/modules/@angular/core/src/di/metadata.ts +++ b/modules/@angular/core/src/di/metadata.ts @@ -40,6 +40,7 @@ import {stringify} from '../../src/facade/lang'; * expect(injector.get(Car).engine instanceof Engine).toBe(true); * ``` * @ts2dart_const + * @stable */ export class InjectMetadata { constructor(public token) {} @@ -67,6 +68,7 @@ export class InjectMetadata { * expect(injector.get(Car).engine).toBeNull(); * ``` * @ts2dart_const + * @stable */ export class OptionalMetadata { toString(): string { return `@Optional()`; } @@ -76,6 +78,7 @@ export class OptionalMetadata { * `DependencyMetadata` is used by the framework to extend DI. * This is internal to Angular and should not be used directly. * @ts2dart_const + * @stable */ export class DependencyMetadata { get token() { return null; } @@ -112,6 +115,7 @@ export class DependencyMetadata { * expect(() => injector.get(NeedsService)).toThrowError(); * ``` * @ts2dart_const + * @stable */ export class InjectableMetadata { constructor() {} @@ -144,6 +148,7 @@ export class InjectableMetadata { * expect(() => child.get(NeedsDependency)).toThrowError(); * ``` * @ts2dart_const + * @stable */ export class SelfMetadata { toString(): string { return `@Self()`; } @@ -174,6 +179,7 @@ export class SelfMetadata { * expect(() => inj.get(NeedsDependency)).toThrowError(); * ``` * @ts2dart_const + * @stable */ export class SkipSelfMetadata { toString(): string { return `@SkipSelf()`; } @@ -233,6 +239,7 @@ export class SkipSelfMetadata { * bootstrap(App); *``` * @ts2dart_const + * @stable */ export class HostMetadata { toString(): string { return `@Host()`; } diff --git a/modules/@angular/core/src/di/opaque_token.ts b/modules/@angular/core/src/di/opaque_token.ts index fddc0fa317..98e2dad0b4 100644 --- a/modules/@angular/core/src/di/opaque_token.ts +++ b/modules/@angular/core/src/di/opaque_token.ts @@ -19,6 +19,7 @@ * Using an `OpaqueToken` is preferable to using an `Object` as tokens because it provides better * error messages. * @ts2dart_const + * @stable */ export class OpaqueToken { constructor(private _desc: string) {} diff --git a/modules/@angular/core/src/di/provider.ts b/modules/@angular/core/src/di/provider.ts index 9b69b704ee..a40e92d73b 100644 --- a/modules/@angular/core/src/di/provider.ts +++ b/modules/@angular/core/src/di/provider.ts @@ -16,6 +16,7 @@ import {BaseException} from '../../src/facade/exceptions'; * expect(injector.get("message")).toEqual('Hello'); * ``` * @ts2dart_const + * @deprecated */ export class Provider { /** @@ -259,6 +260,7 @@ export function bind(token): ProviderBuilder { /** * Helper class for the {@link bind} function. + * @deprecated */ export class ProviderBuilder { constructor(public token) {} @@ -384,6 +386,7 @@ export class ProviderBuilder { * See {@link Provider} for more details. * * + * @deprecated */ export function provide(token, {useClass, useValue, useExisting, useFactory, deps, multi}: { useClass?: Type, diff --git a/modules/@angular/core/src/di/reflective_exceptions.ts b/modules/@angular/core/src/di/reflective_exceptions.ts index 9915001c81..7c83763a3a 100644 --- a/modules/@angular/core/src/di/reflective_exceptions.ts +++ b/modules/@angular/core/src/di/reflective_exceptions.ts @@ -30,6 +30,7 @@ function constructResolvingPath(keys: any[]): string { /** * Base class for all errors arising from misconfigured providers. + * @stable */ export class AbstractProviderError extends BaseException { /** @internal */ @@ -75,6 +76,7 @@ export class AbstractProviderError extends BaseException { * * expect(() => Injector.resolveAndCreate([A])).toThrowError(); * ``` + * @stable */ export class NoProviderError extends AbstractProviderError { constructor(injector: ReflectiveInjector, key: ReflectiveKey) { @@ -100,6 +102,7 @@ export class NoProviderError extends AbstractProviderError { * ``` * * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed. + * @stable */ export class CyclicDependencyError extends AbstractProviderError { constructor(injector: ReflectiveInjector, key: ReflectiveKey) { @@ -134,6 +137,7 @@ export class CyclicDependencyError extends AbstractProviderError { * expect(e.originalStack).toBeDefined(); * } * ``` + * @stable */ export class InstantiationError extends WrappedException { /** @internal */ @@ -172,6 +176,7 @@ export class InstantiationError extends WrappedException { * ```typescript * expect(() => Injector.resolveAndCreate(["not a type"])).toThrowError(); * ``` + * @stable */ export class InvalidProviderError extends BaseException { constructor(provider) { @@ -206,6 +211,7 @@ export class InvalidProviderError extends BaseException { * * expect(() => Injector.resolveAndCreate([A,B])).toThrowError(); * ``` + * @stable */ export class NoAnnotationError extends BaseException { constructor(typeOrFunc, params: any[][]) { @@ -241,6 +247,7 @@ export class NoAnnotationError extends BaseException { * * expect(() => injector.getAt(100)).toThrowError(); * ``` + * @stable */ export class OutOfBoundsError extends BaseException { constructor(index) { super(`Index ${index} is out-of-bounds.`); } diff --git a/modules/@angular/core/src/di/reflective_injector.ts b/modules/@angular/core/src/di/reflective_injector.ts index 67e279867a..9619f21608 100644 --- a/modules/@angular/core/src/di/reflective_injector.ts +++ b/modules/@angular/core/src/di/reflective_injector.ts @@ -448,6 +448,7 @@ export abstract class ReflectiveInjector implements Injector { * var injector = ReflectiveInjector.fromResolvedProviders(providers); * expect(injector.get(Car) instanceof Car).toBe(true); * ``` + * @experimental */ static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent: Injector = null): ReflectiveInjector { diff --git a/modules/@angular/core/src/di/reflective_key.ts b/modules/@angular/core/src/di/reflective_key.ts index 2855e84dd7..5923392612 100644 --- a/modules/@angular/core/src/di/reflective_key.ts +++ b/modules/@angular/core/src/di/reflective_key.ts @@ -16,6 +16,7 @@ import {resolveForwardRef} from './forward_ref'; * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when * resolving * providers. + * @experimental */ export class ReflectiveKey { /** diff --git a/modules/@angular/core/src/di/reflective_provider.ts b/modules/@angular/core/src/di/reflective_provider.ts index f08bfff10d..6a7054fcf4 100644 --- a/modules/@angular/core/src/di/reflective_provider.ts +++ b/modules/@angular/core/src/di/reflective_provider.ts @@ -88,6 +88,7 @@ export class ResolvedReflectiveProvider_ implements ResolvedReflectiveBinding { /** * An internal resolved representation of a factory function created by resolving {@link Provider}. + * @experimental */ export class ResolvedReflectiveFactory { constructor( diff --git a/modules/@angular/core/src/linker/component_factory.ts b/modules/@angular/core/src/linker/component_factory.ts index 4743ce85f0..812007282c 100644 --- a/modules/@angular/core/src/linker/component_factory.ts +++ b/modules/@angular/core/src/linker/component_factory.ts @@ -13,6 +13,7 @@ import {Injector} from '../di/injector'; * `ComponentRef` provides access to the Component Instance as well other objects related to this * Component Instance and allows you to destroy the Component Instance via the {@link #destroy} * method. + * @stable */ export abstract class ComponentRef { /** @@ -69,9 +70,12 @@ export class ComponentRef_ extends ComponentRef { onDestroy(callback: Function): void { this.hostView.onDestroy(callback); } } -const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object(); -/*@ts2dart_const*/ +/** + * @experimental + * @ts2dart_const + */ +const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object(); export class ComponentFactory { constructor(public selector: string, private _viewFactory: Function, private _componentType: Type) {} diff --git a/modules/@angular/core/src/linker/component_resolver.ts b/modules/@angular/core/src/linker/component_resolver.ts index 3a44b20a1c..84fa62674b 100644 --- a/modules/@angular/core/src/linker/component_resolver.ts +++ b/modules/@angular/core/src/linker/component_resolver.ts @@ -8,6 +8,7 @@ import {Injectable} from '../di/decorators'; /** * Low-level service for loading {@link ComponentFactory}s, which * can later be used to create and render a Component instance. + * @experimental */ export abstract class ComponentResolver { abstract resolveComponent(component: Type|string): Promise>; diff --git a/modules/@angular/core/src/linker/element_ref.ts b/modules/@angular/core/src/linker/element_ref.ts index 5202c4f9dc..16468ba3f9 100644 --- a/modules/@angular/core/src/linker/element_ref.ts +++ b/modules/@angular/core/src/linker/element_ref.ts @@ -26,6 +26,7 @@ export class ElementRef { * web worker. *

* + * @stable */ public nativeElement: any; diff --git a/modules/@angular/core/src/linker/exceptions.ts b/modules/@angular/core/src/linker/exceptions.ts index 683ce4968d..5b49757e00 100644 --- a/modules/@angular/core/src/linker/exceptions.ts +++ b/modules/@angular/core/src/linker/exceptions.ts @@ -32,6 +32,7 @@ import {BaseException, WrappedException} from '../../src/facade/exceptions'; * } * } * ``` + * @stable */ export class ExpressionChangedAfterItHasBeenCheckedException extends BaseException { constructor(oldValue: any, currValue: any, context: any) { @@ -45,6 +46,7 @@ export class ExpressionChangedAfterItHasBeenCheckedException extends BaseExcepti * * This error wraps the original exception to attach additional contextual information that can * be useful for debugging. + * @stable */ export class ViewWrappedException extends WrappedException { constructor(originalException: any, originalStack: any, context: any) { @@ -58,6 +60,7 @@ export class ViewWrappedException extends WrappedException { * This error indicates a bug in the framework. * * This is an internal Angular error. + * @stable */ export class ViewDestroyedException extends BaseException { constructor(details: string) { super(`Attempt to use a destroyed view: ${details}`); } diff --git a/modules/@angular/core/src/linker/query_list.ts b/modules/@angular/core/src/linker/query_list.ts index ff2e286014..bc9c9f459d 100644 --- a/modules/@angular/core/src/linker/query_list.ts +++ b/modules/@angular/core/src/linker/query_list.ts @@ -26,6 +26,7 @@ import {Observable, EventEmitter} from '../../src/facade/async'; * } * } * ``` + * @deprecated */ export class QueryList { private _dirty = true; diff --git a/modules/@angular/core/src/linker/systemjs_component_resolver.ts b/modules/@angular/core/src/linker/systemjs_component_resolver.ts index 955d4f3b87..7e495cba0a 100644 --- a/modules/@angular/core/src/linker/systemjs_component_resolver.ts +++ b/modules/@angular/core/src/linker/systemjs_component_resolver.ts @@ -4,6 +4,7 @@ import { ComponentFactory } from './component_factory'; /** * Component resolver that can load components lazily + * @experimental */ export class SystemJsComponentResolver implements ComponentResolver { constructor(private _resolver: ComponentResolver) {} diff --git a/modules/@angular/core/src/linker/template_ref.ts b/modules/@angular/core/src/linker/template_ref.ts index 25e3e6ea06..2459fb5fa7 100644 --- a/modules/@angular/core/src/linker/template_ref.ts +++ b/modules/@angular/core/src/linker/template_ref.ts @@ -17,6 +17,7 @@ const EMPTY_CONTEXT = /*@ts2dart_const*/ new Object(); * To instantiate Embedded Views based on a Template, use * {@link ViewContainerRef#createEmbeddedView}, which will create the View and attach it to the * View Container. + * @stable */ export abstract class TemplateRef { /** diff --git a/modules/@angular/core/src/linker/view_container_ref.ts b/modules/@angular/core/src/linker/view_container_ref.ts index e1eb77c14f..ebb3020b13 100644 --- a/modules/@angular/core/src/linker/view_container_ref.ts +++ b/modules/@angular/core/src/linker/view_container_ref.ts @@ -27,6 +27,7 @@ import {ComponentFactory, ComponentRef} from './component_factory'; * * To access a `ViewContainerRef` of an Element, you can either place a {@link Directive} injected * with `ViewContainerRef` on the Element, or you obtain it via a {@link ViewChild} query. + * @stable */ export abstract class ViewContainerRef { /** diff --git a/modules/@angular/core/src/linker/view_ref.ts b/modules/@angular/core/src/linker/view_ref.ts index 16788d85d7..c2c1182c17 100644 --- a/modules/@angular/core/src/linker/view_ref.ts +++ b/modules/@angular/core/src/linker/view_ref.ts @@ -3,6 +3,9 @@ import {ChangeDetectorRef} from '../change_detection/change_detector_ref'; import {AppView} from './view'; import {ChangeDetectionStrategy} from '../change_detection/constants'; +/** + * @stable + */ export abstract class ViewRef { get destroyed(): boolean { return unimplemented(); } @@ -61,6 +64,7 @@ export abstract class ViewRef { * * * ``` + * @experimental */ export abstract class EmbeddedViewRef extends ViewRef { get context(): C { return unimplemented(); } diff --git a/modules/@angular/core/src/metadata.dart b/modules/@angular/core/src/metadata.dart index dc9eb77ec9..78f4edbff4 100644 --- a/modules/@angular/core/src/metadata.dart +++ b/modules/@angular/core/src/metadata.dart @@ -22,6 +22,7 @@ export './metadata/lifecycle_hooks.dart' show /** * See: [DirectiveMetadata] for docs. + * @stable */ class Directive extends DirectiveMetadata { const Directive( @@ -50,6 +51,7 @@ class Directive extends DirectiveMetadata { /** * See: [ComponentMetadata] for docs. + * @stable */ class Component extends ComponentMetadata { const Component( @@ -100,6 +102,7 @@ class Component extends ComponentMetadata { /** * See: [ViewMetadata] for docs. + * @deprecated */ class View extends ViewMetadata { const View( @@ -124,6 +127,7 @@ class View extends ViewMetadata { /** * See: [PipeMetadata] for docs. + * @stable */ class Pipe extends PipeMetadata { const Pipe({name, pure}) : super(name: name, pure: pure); @@ -131,6 +135,7 @@ class Pipe extends PipeMetadata { /** * See: [AttributeMetadata] for docs. + * @stable */ class Attribute extends AttributeMetadata { const Attribute(String attributeName) : super(attributeName); @@ -138,8 +143,8 @@ class Attribute extends AttributeMetadata { /** * See: [QueryMetadata] for docs. + * @deprecated Use ContentChildren/ContentChild instead */ -@Deprecated("Use ContentChildren/ContentChild instead") class Query extends QueryMetadata { const Query(dynamic /*Type | string*/ selector, {bool descendants: false, dynamic read: null}) @@ -148,6 +153,7 @@ class Query extends QueryMetadata { /** * See: [ContentChildrenMetadata] for docs. + * @stable */ class ContentChildren extends ContentChildrenMetadata { const ContentChildren(dynamic /*Type | string*/ selector, @@ -157,6 +163,7 @@ class ContentChildren extends ContentChildrenMetadata { /** * See: [ContentChildMetadata] for docs. + * @stable */ class ContentChild extends ContentChildMetadata { const ContentChild(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); @@ -164,8 +171,8 @@ class ContentChild extends ContentChildMetadata { /** * See: [ViewQueryMetadata] for docs. + * @deprecated Use ViewChildren/ViewChild instead */ -@Deprecated("Use ViewChildren/ViewChild instead") class ViewQuery extends ViewQueryMetadata { const ViewQuery(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, descendants: true, read: read); @@ -173,6 +180,7 @@ class ViewQuery extends ViewQueryMetadata { /** * See: [ViewChildrenMetadata] for docs. + * @stable */ class ViewChildren extends ViewChildrenMetadata { const ViewChildren(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); @@ -180,6 +188,7 @@ class ViewChildren extends ViewChildrenMetadata { /** * See: [ViewChildMetadata] for docs. + * @stable */ class ViewChild extends ViewChildMetadata { const ViewChild(dynamic /*Type | string*/ selector, {dynamic read: null}) : super(selector, read: read); @@ -187,6 +196,7 @@ class ViewChild extends ViewChildMetadata { /** * See: [InputMetadata] for docs. + * @stable */ class Input extends InputMetadata { const Input([String bindingPropertyName]) : super(bindingPropertyName); @@ -194,6 +204,7 @@ class Input extends InputMetadata { /** * See: [OutputMetadata] for docs. + * @stable */ class Output extends OutputMetadata { const Output([String bindingPropertyName]) : super(bindingPropertyName); @@ -201,6 +212,7 @@ class Output extends OutputMetadata { /** * See: [HostBindingMetadata] for docs. + * @stable */ class HostBinding extends HostBindingMetadata { const HostBinding([String hostPropertyName]) : super(hostPropertyName); @@ -208,6 +220,7 @@ class HostBinding extends HostBindingMetadata { /** * See: [HostListenerMetadata] for docs. + * @stable */ class HostListener extends HostListenerMetadata { const HostListener(String eventName, [List args]) diff --git a/modules/@angular/core/src/metadata.ts b/modules/@angular/core/src/metadata.ts index b1606ed53f..7755040aa8 100644 --- a/modules/@angular/core/src/metadata.ts +++ b/modules/@angular/core/src/metadata.ts @@ -397,6 +397,7 @@ export interface AttributeMetadataFactory { * [new ng.Query(SomeType)] * ] * ``` + * @deprecated */ export interface QueryMetadataFactory { (selector: Type | string, @@ -407,6 +408,7 @@ export interface QueryMetadataFactory { /** * Factory for {@link ContentChildren}. + * @stable */ export interface ContentChildrenMetadataFactory { (selector: Type | string, {descendants, read}?: {descendants?: boolean, read?: any}): any; @@ -416,6 +418,7 @@ export interface ContentChildrenMetadataFactory { /** * Factory for {@link ContentChild}. + * @stable */ export interface ContentChildMetadataFactory { (selector: Type | string, {read}?: {read?: any}): any; @@ -424,6 +427,7 @@ export interface ContentChildMetadataFactory { /** * Factory for {@link ViewChildren}. + * @stable */ export interface ViewChildrenMetadataFactory { (selector: Type | string, {read}?: {read?: any}): any; @@ -432,6 +436,7 @@ export interface ViewChildrenMetadataFactory { /** * Factory for {@link ViewChild}. + * @stable */ export interface ViewChildMetadataFactory { (selector: Type | string, {read}?: {read?: any}): any; @@ -445,6 +450,7 @@ export interface ViewChildMetadataFactory { * ### Example * * {@example core/ts/metadata/metadata.ts region='pipe'} + * @stable */ export interface PipeMetadataFactory { (obj: {name: string, pure?: boolean}): any; @@ -455,6 +461,7 @@ export interface PipeMetadataFactory { * {@link InputMetadata} factory for creating decorators. * * See {@link InputMetadata}. + * @stable */ export interface InputMetadataFactory { (bindingPropertyName?: string): any; @@ -465,6 +472,7 @@ export interface InputMetadataFactory { * {@link OutputMetadata} factory for creating decorators. * * See {@link OutputMetadata}. + * @stable */ export interface OutputMetadataFactory { (bindingPropertyName?: string): any; @@ -473,6 +481,7 @@ export interface OutputMetadataFactory { /** * {@link HostBindingMetadata} factory function. + * @stable */ export interface HostBindingMetadataFactory { (hostPropertyName?: string): any; @@ -481,6 +490,7 @@ export interface HostBindingMetadataFactory { /** * {@link HostListenerMetadata} factory function. + * @stable */ export interface HostListenerMetadataFactory { (eventName: string, args?: string[]): any; @@ -510,6 +520,7 @@ export interface HostListenerMetadataFactory { * ### Example * * {@example core/ts/metadata/metadata.ts region='component'} + * @stable */ export var Component: ComponentMetadataFactory = makeDecorator(ComponentMetadata, (fn: any) => fn.View = View); @@ -892,6 +903,7 @@ export var Component: ComponentMetadataFactory = * Note also that although the `
  • ` template still exists inside the ``, * the instantiated * view occurs on the second `
  • ` which is a sibling to the `