From a0e13b97979d76887b360842aa23e344b94123b3 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Wed, 17 Aug 2016 16:53:09 -0700 Subject: [PATCH] refactor(core): remove deprecated functions ReflectiveInjector.fromResolvedBindings and ResolvedReflectiveBinding (#10819) --- modules/@angular/core/src/di.ts | 2 +- modules/@angular/core/src/di/reflective_injector.ts | 7 ------- modules/@angular/core/src/di/reflective_provider.ts | 9 +-------- modules/@angular/docs/di/di.md | 6 +++--- tools/public_api_guard/core/index.d.ts | 5 ----- 5 files changed, 5 insertions(+), 24 deletions(-) diff --git a/modules/@angular/core/src/di.ts b/modules/@angular/core/src/di.ts index 87fae3a288..de10d17d02 100644 --- a/modules/@angular/core/src/di.ts +++ b/modules/@angular/core/src/di.ts @@ -23,7 +23,7 @@ export {forwardRef, resolveForwardRef, ForwardRefFn} from './di/forward_ref'; export {Injector} from './di/injector'; export {ReflectiveInjector} from './di/reflective_injector'; export {Provider, TypeProvider, ValueProvider, ClassProvider, ExistingProvider, FactoryProvider} from './di/provider'; -export {ResolvedReflectiveBinding, ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './di/reflective_provider'; +export {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './di/reflective_provider'; export {ReflectiveKey} from './di/reflective_key'; export {NoProviderError, AbstractProviderError, CyclicDependencyError, InstantiationError, InvalidProviderError, NoAnnotationError, OutOfBoundsError} from './di/reflective_exceptions'; export {OpaqueToken} from './di/opaque_token'; diff --git a/modules/@angular/core/src/di/reflective_injector.ts b/modules/@angular/core/src/di/reflective_injector.ts index 46b76b9a10..f41dfc7f68 100644 --- a/modules/@angular/core/src/di/reflective_injector.ts +++ b/modules/@angular/core/src/di/reflective_injector.ts @@ -456,13 +456,6 @@ export abstract class ReflectiveInjector implements Injector { ReflectiveProtoInjector.fromResolvedProviders(providers), parent); } - /** - * @deprecated - */ - static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector { - return ReflectiveInjector.fromResolvedProviders(providers); - } - /** * Parent of this injector. diff --git a/modules/@angular/core/src/di/reflective_provider.ts b/modules/@angular/core/src/di/reflective_provider.ts index 90bea61879..bd55c6294f 100644 --- a/modules/@angular/core/src/di/reflective_provider.ts +++ b/modules/@angular/core/src/di/reflective_provider.ts @@ -72,14 +72,7 @@ export interface ResolvedReflectiveProvider { multiProvider: boolean; } -/** - * See {@link ResolvedReflectiveProvider} instead. - * - * @deprecated - */ -export interface ResolvedReflectiveBinding extends ResolvedReflectiveProvider {} - -export class ResolvedReflectiveProvider_ implements ResolvedReflectiveBinding { +export class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider { constructor( public key: ReflectiveKey, public resolvedFactories: ResolvedReflectiveFactory[], public multiProvider: boolean) {} diff --git a/modules/@angular/docs/di/di.md b/modules/@angular/docs/di/di.md index 5d34efa936..5a1863e2cd 100644 --- a/modules/@angular/docs/di/di.md +++ b/modules/@angular/docs/di/di.md @@ -230,9 +230,9 @@ The `resolveAndCreate` and `resolveAndCreateChild` functions resolve passed-in b You can create an injector using a list of resolved bindings. ``` -var listOfResolvingBindings = Injector.resolve([Binding1, Binding2]); -var inj = Injector.fromResolvedBindings(listOfResolvingBindings); -inj.createChildFromResolvedBindings(listOfResolvedBindings); +var listOfResolvingProviders = Injector.resolve([Provider11, Provider2]); +var inj = Injector.fromResolvedProviders(listOfResolvingProviders); +inj.createChildFromResolvedProviders(listOfResolvedProviders); ``` diff --git a/tools/public_api_guard/core/index.d.ts b/tools/public_api_guard/core/index.d.ts index d6ebb7de8e..a55ab9f16e 100644 --- a/tools/public_api_guard/core/index.d.ts +++ b/tools/public_api_guard/core/index.d.ts @@ -1004,7 +1004,6 @@ export declare abstract class ReflectiveInjector implements Injector { instantiateResolved(provider: ResolvedReflectiveProvider): any; resolveAndCreateChild(providers: Provider[]): ReflectiveInjector; resolveAndInstantiate(provider: Provider): any; - /** @deprecated */ static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector; /** @experimental */ static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector; static resolve(providers: Provider[]): ResolvedReflectiveProvider[]; static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector; @@ -1058,10 +1057,6 @@ export declare abstract class Renderer { abstract setText(renderNode: any, text: string): void; } -/** @deprecated */ -export interface ResolvedReflectiveBinding extends ResolvedReflectiveProvider { -} - /** @experimental */ export declare class ResolvedReflectiveFactory { dependencies: ReflectiveDependency[];