Skip to content

Commit

Permalink
feat(injector): improve set method api
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-sa committed Mar 7, 2024
1 parent 3e09ddf commit 14a4c9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/injector/src/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class Injector implements InjectorInterface {
throw new Error(`Invalid get<T> argument given ${token}`);
}

set<T>(token: T, value: any, scope?: Scope): void {
set(token: ContainerToken, value: any, scope?: Scope): void {
if (!this.setter) throw new Error('Injector was not built');
this.setter(token, value, scope);
}
Expand Down Expand Up @@ -914,7 +914,7 @@ export class InjectorContext {
return this.getInjector(module || this.rootModule).instantiationCount(token, this.scope ? this.scope.name : scope);
}

set<T>(token: T, value: any, module?: InjectorModule): void {
set(token: ContainerToken, value: any, module?: InjectorModule): void {
return this.getInjector(module || this.rootModule).set(token, value, this.scope);
}

Expand Down

0 comments on commit 14a4c9f

Please sign in to comment.