diff --git a/modules/angular2/src/core/compiler/element_injector.ts b/modules/angular2/src/core/compiler/element_injector.ts index d08231bd00..59fe3496cd 100644 --- a/modules/angular2/src/core/compiler/element_injector.ts +++ b/modules/angular2/src/core/compiler/element_injector.ts @@ -19,8 +19,7 @@ import { NoBindingError, AbstractBindingError, CyclicDependencyError, - resolveForwardRef, - DependencyProvider + resolveForwardRef } from 'angular2/src/core/di'; import { UNDEFINED, @@ -28,7 +27,8 @@ import { Visibility, InjectorInlineStrategy, InjectorDynamicStrategy, - BindingWithVisibility + BindingWithVisibility, + DependencyProvider } from 'angular2/src/core/di/injector'; import {resolveBinding, ResolvedFactory} from 'angular2/src/core/di/binding'; diff --git a/modules/angular2/src/core/di.ts b/modules/angular2/src/core/di.ts index 27f1e3ef73..9eb4b4022b 100644 --- a/modules/angular2/src/core/di.ts +++ b/modules/angular2/src/core/di.ts @@ -18,7 +18,7 @@ export { export * from './di/decorators'; export {forwardRef, resolveForwardRef, ForwardRefFn} from './di/forward_ref'; -export {Injector, DependencyProvider} from './di/injector'; +export {Injector} from './di/injector'; export { Binding, BindingBuilder, @@ -27,7 +27,7 @@ export { Dependency, bind } from './di/binding'; -export {Key, KeyRegistry, TypeLiteral} from './di/key'; +export {Key, TypeLiteral} from './di/key'; export { NoBindingError, AbstractBindingError, diff --git a/modules/angular2/src/core/di/binding.ts b/modules/angular2/src/core/di/binding.ts index 021d861411..c1177af567 100644 --- a/modules/angular2/src/core/di/binding.ts +++ b/modules/angular2/src/core/di/binding.ts @@ -254,6 +254,9 @@ export class Binding { * ``` */ export class ResolvedBinding { + /** + * @private + */ constructor( /** * A key, usually a `Type`. @@ -261,11 +264,13 @@ export class ResolvedBinding { public key: Key, /** + * @private * Factory function which can return an instance of an object represented by a key. */ public resolvedFactories: ResolvedFactory[], /** + * @private * Indicates if the binding is a multi-binding or a regular binding. */ public multiBinding: boolean) {} @@ -275,6 +280,7 @@ export class ResolvedBinding { } /** + * @private * An internal resolved representation of a factory function created by resolving {@link Binding}. */ export class ResolvedFactory { diff --git a/modules/angular2/src/core/di/forward_ref.ts b/modules/angular2/src/core/di/forward_ref.ts index dff94f837b..f7965b9ac9 100644 --- a/modules/angular2/src/core/di/forward_ref.ts +++ b/modules/angular2/src/core/di/forward_ref.ts @@ -1,5 +1,14 @@ import {Type, stringify, isFunction} from 'angular2/src/core/facade/lang'; +/** + * An interface that a function passed into {@link forwardRef} has to implement. + * + * ### Example + * + * ```typescript + * var fn:ForwardRefFn = forwardRef(() => Lock); + * ``` + */ export interface ForwardRefFn { (): any; } /** diff --git a/modules/angular2/src/core/di/metadata.ts b/modules/angular2/src/core/di/metadata.ts index 6ea1a62254..bb3a7742b3 100644 --- a/modules/angular2/src/core/di/metadata.ts +++ b/modules/angular2/src/core/di/metadata.ts @@ -74,29 +74,7 @@ export class OptionalMetadata { /** * `DependencyMetadata` is used by the framework to extend DI. - * - * Only metadata implementing `DependencyMetadata` are added to the list of dependency - * properties. - * - * For example: - * - * ``` - * class Exclude extends DependencyMetadata {} - * class NotDependencyProperty {} - * - * class AComponent { - * constructor(@Exclude @NotDependencyProperty aService:AService) {} - * } - * ``` - * - * will create the following dependency: - * - * ``` - * new Dependency(Key.get(AService), [new Exclude()]) - * ``` - * - * The framework can use `new Exclude()` to handle the `aService` dependency - * in a specific way. + * This is internal to Angular and should not be used directly. */ @CONST() export class DependencyMetadata {