Hauke B.

Results 41 comments of Hauke B.

I think `token()` should know the arguments because it should be the only source of the type of the service. If thats true than only a factory which has the...

I am busy atm but I will take a look into it within the next days.

Hi, sorry but I still had no time to look deeply into it. I merged it and I will publish a new alpha version, so you can clean up a...

it can be done in define itself. `Array.isArray(tags) ? tags : [tags]` or `typeof tags === "symbol" ? [tags] : tags` is ok IMO. That's not uncommon ;-) We can't...

Hey, the dependency/service can be a Promise itself, doesn't that help? ```typescript const TYPE = { Dependency: token("dependency"), }; container.bind(TYPE.Dependency)).toFactory(async () => { const dependency = new Dependency(); await dependency.someAsyncFunction();...

Recursion should work as normal if you don't access the constructor in a constructor, or access a function in a factory which calls a function of the depending service. But...

> > I never had a usecase where I needed a async service. I use Promise a lot but not on that level. Only where needed in methods or getter....

Yea. I love to discuss code and ideas. :) First I need to add some inline documentation I think: #33. Because I have not that much time still it may...

Hey, with the new 2.x it will be possible after a type change to pass some custom arguments to plugins: https://github.com/owja/ioc/projects/2#card-82636307 With a small additional change it could be possible...

> > I am not a big fan of this > > Why? Is it a bad practice? 🤔 it just adds complexity :-D #57 (just to link your PR...