Skip to content

Commit

Permalink
chore(di): Remove static method InjectorService.construct
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove static method InjectorService.construct. No alternative.
  • Loading branch information
Romakita committed Dec 23, 2018
1 parent abc70c4 commit 1215d3c
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions packages/di/src/services/InjectorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {InjectionScopeError} from "../errors/InjectionScopeError";
import {IInjectableMethod, IProvider, ProviderScope} from "../interfaces";
import {IInjectableProperties, IInjectablePropertyService, IInjectablePropertyValue} from "../interfaces/IInjectableProperties";
import {ProviderType} from "../interfaces/ProviderType";
import {GlobalProviders, ProviderRegistry, registerFactory, registerProvider, registerService} from "../registries/ProviderRegistry";
import {GlobalProviders, registerFactory, registerProvider, registerService} from "../registries/ProviderRegistry";

let globalInjector: any;

Expand Down Expand Up @@ -565,19 +565,6 @@ export class InjectorService extends Map<RegistryKey, Provider<any>> {
return globalInjector.invoke(target, locals, designParamTypes, requiredScope);
}

/**
* Construct the service with his dependencies.
* @param target The service to be built.
* @deprecated
*/
@Deprecated("removed feature")
/* istanbul ignore next */
static construct<T>(target: Type<any> | symbol): T {
const provider: Provider<any> = ProviderRegistry.get(target)!;

return this.invoke<any>(provider.useClass);
}

/**
* Invoke a class method and inject service.
*
Expand Down

0 comments on commit 1215d3c

Please sign in to comment.