Skip to content

Commit

Permalink
fix type of generated factory when onCreate hook is async
Browse files Browse the repository at this point in the history
  • Loading branch information
jahudka committed Aug 22, 2023
1 parent dac64b5 commit 30d9358
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions core/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ioc",
"inversion of control"
],
"version": "0.0.29",
"version": "0.0.30",
"license": "MIT",
"author": {
"name": "Dan Kadera",
Expand All @@ -32,7 +32,7 @@
"dicc": "dist/cli.js"
},
"dependencies": {
"dicc": "^0.0.23",
"dicc": "^0.0.24",
"ts-morph": "^18.0",
"typescript": "^5.0",
"yaml": "^2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion core/dicc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"ioc",
"inversion of control"
],
"version": "0.0.23",
"version": "0.0.24",
"license": "MIT",
"author": {
"name": "Dan Kadera",
Expand Down
2 changes: 1 addition & 1 deletion core/dicc/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export type CompiledFactory<T, Services extends Record<string, any> = {}> = {

export type CompiledAsyncServiceDefinition<T = any, Services extends Record<string, any> = {}>
= CompiledServiceDefinitionOptions<NonNullable<T>, Services> & {
factory: CompiledFactory<Promise<T>, Services>;
factory: CompiledFactory<Promise<T> | T, Services>;
async: true;
onCreate?: CompiledAsyncServiceHook<NonNullable<T>, Services>;
};
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 30d9358

Please sign in to comment.