Skip to content

Commit

Permalink
feat(common): disallow usage of inject on class and value providers
Browse files Browse the repository at this point in the history
  • Loading branch information
micalevisk committed Mar 25, 2022
1 parent 061a19e commit 7ef0d87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/common/interfaces/modules/provider.interface.ts
Expand Up @@ -46,6 +46,8 @@ export interface ClassProvider<T = any> {
* Optional enum defining lifetime of the provider that is injected.
*/
scope?: Scope;
/** This option is only available on factory providers. */
inject?: never;
}

/**
Expand All @@ -72,6 +74,8 @@ export interface ValueProvider<T = any> {
* Instance of a provider to be injected.
*/
useValue: T;
/** This option is only available on factory providers. */
inject?: never;
}

/**
Expand Down

0 comments on commit 7ef0d87

Please sign in to comment.