Skip to content

Commit

Permalink
Allow retrieving value later
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBGD committed Nov 16, 2021
1 parent 8263056 commit 2625b2a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@technove/inject",
"description": "Dependency injection for TypeScript",
"version": "0.1.5",
"version": "0.1.6",
"author": "PaulBGD",
"license": "MIT",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/decorators/inject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const Inject: (
defaultValue,
target,
type: propertyType,
getValue: () => val,
};

const retrieved = retrievalProvider(container, field);
Expand Down
2 changes: 2 additions & 0 deletions src/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export type FieldProperty<T> = {
type: PropertyType;
name: string;
defaultValue: T;

getValue(): T;
};

export type FieldParameter = {
Expand Down

0 comments on commit 2625b2a

Please sign in to comment.