refactor(core): remove deprecated functions ReflectiveInjector.fromResolvedBindings and ResolvedReflectiveBinding (#10819)
This commit is contained in:
parent
a5c0349d88
commit
a0e13b9797
|
@ -23,7 +23,7 @@ export {forwardRef, resolveForwardRef, ForwardRefFn} from './di/forward_ref';
|
||||||
export {Injector} from './di/injector';
|
export {Injector} from './di/injector';
|
||||||
export {ReflectiveInjector} from './di/reflective_injector';
|
export {ReflectiveInjector} from './di/reflective_injector';
|
||||||
export {Provider, TypeProvider, ValueProvider, ClassProvider, ExistingProvider, FactoryProvider} from './di/provider';
|
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 {ReflectiveKey} from './di/reflective_key';
|
||||||
export {NoProviderError, AbstractProviderError, CyclicDependencyError, InstantiationError, InvalidProviderError, NoAnnotationError, OutOfBoundsError} from './di/reflective_exceptions';
|
export {NoProviderError, AbstractProviderError, CyclicDependencyError, InstantiationError, InvalidProviderError, NoAnnotationError, OutOfBoundsError} from './di/reflective_exceptions';
|
||||||
export {OpaqueToken} from './di/opaque_token';
|
export {OpaqueToken} from './di/opaque_token';
|
||||||
|
|
|
@ -456,13 +456,6 @@ export abstract class ReflectiveInjector implements Injector {
|
||||||
ReflectiveProtoInjector.fromResolvedProviders(providers), parent);
|
ReflectiveProtoInjector.fromResolvedProviders(providers), parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector {
|
|
||||||
return ReflectiveInjector.fromResolvedProviders(providers);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parent of this injector.
|
* Parent of this injector.
|
||||||
|
|
|
@ -72,14 +72,7 @@ export interface ResolvedReflectiveProvider {
|
||||||
multiProvider: boolean;
|
multiProvider: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
export class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider {
|
||||||
* See {@link ResolvedReflectiveProvider} instead.
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
export interface ResolvedReflectiveBinding extends ResolvedReflectiveProvider {}
|
|
||||||
|
|
||||||
export class ResolvedReflectiveProvider_ implements ResolvedReflectiveBinding {
|
|
||||||
constructor(
|
constructor(
|
||||||
public key: ReflectiveKey, public resolvedFactories: ResolvedReflectiveFactory[],
|
public key: ReflectiveKey, public resolvedFactories: ResolvedReflectiveFactory[],
|
||||||
public multiProvider: boolean) {}
|
public multiProvider: boolean) {}
|
||||||
|
|
|
@ -230,9 +230,9 @@ The `resolveAndCreate` and `resolveAndCreateChild` functions resolve passed-in b
|
||||||
You can create an injector using a list of resolved bindings.
|
You can create an injector using a list of resolved bindings.
|
||||||
|
|
||||||
```
|
```
|
||||||
var listOfResolvingBindings = Injector.resolve([Binding1, Binding2]);
|
var listOfResolvingProviders = Injector.resolve([Provider11, Provider2]);
|
||||||
var inj = Injector.fromResolvedBindings(listOfResolvingBindings);
|
var inj = Injector.fromResolvedProviders(listOfResolvingProviders);
|
||||||
inj.createChildFromResolvedBindings(listOfResolvedBindings);
|
inj.createChildFromResolvedProviders(listOfResolvedProviders);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1004,7 +1004,6 @@ export declare abstract class ReflectiveInjector implements Injector {
|
||||||
instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
instantiateResolved(provider: ResolvedReflectiveProvider): any;
|
||||||
resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
resolveAndCreateChild(providers: Provider[]): ReflectiveInjector;
|
||||||
resolveAndInstantiate(provider: Provider): any;
|
resolveAndInstantiate(provider: Provider): any;
|
||||||
/** @deprecated */ static fromResolvedBindings(providers: ResolvedReflectiveProvider[]): ReflectiveInjector;
|
|
||||||
/** @experimental */ static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
|
/** @experimental */ static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector): ReflectiveInjector;
|
||||||
static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
|
static resolve(providers: Provider[]): ResolvedReflectiveProvider[];
|
||||||
static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
|
static resolveAndCreate(providers: Provider[], parent?: Injector): ReflectiveInjector;
|
||||||
|
@ -1058,10 +1057,6 @@ export declare abstract class Renderer {
|
||||||
abstract setText(renderNode: any, text: string): void;
|
abstract setText(renderNode: any, text: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
export interface ResolvedReflectiveBinding extends ResolvedReflectiveProvider {
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare class ResolvedReflectiveFactory {
|
export declare class ResolvedReflectiveFactory {
|
||||||
dependencies: ReflectiveDependency[];
|
dependencies: ReflectiveDependency[];
|
||||||
|
|
Loading…
Reference in New Issue