Skip to content

Commit

Permalink
Assert returned value type
Browse files Browse the repository at this point in the history
  • Loading branch information
kburov-sc committed Nov 26, 2024
1 parent 44b4588 commit e3f193e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ export class Container<Services = {}> {
providesClass = <Token extends TokenType, Service, Tokens extends readonly ValidTokens<Services>[]>(
token: Token,
cls: InjectableClass<Services, Service, Tokens>
) => this.providesService(ClassInjectable(token, cls));
) => this.providesService(ClassInjectable(token, cls)) as Container<AddService<Services, Token, Service>>;

/**
* Registers a static value as a service in the container. This method is ideal for services that do not
Expand Down

0 comments on commit e3f193e

Please sign in to comment.