Now that old decorator repo is not maintained any more, how do I lazily instantiate services? #1876
-
My using environment is Huawei Harmony Next platform, where a typescript variation (and extension) called ArkTS is used as the main programming language and standard TS and JS can be used also with limitations. Since my app works on mobile phones, it's important that the startup time stays short. I see that old decorators for lazily instantiating (making) services are out of date now, but is there way I can do lazy stuff without adding more bindings (like providers) because resolving is somewhat time costly? Neither do I like the way to directly call the container instance on my thread. Thanks for anything. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @GarfieldJiang, as I commented in the inversify-binding-decorators repo:
Current binding decorators are implemented in the monorepo and documented here. If you were using
Nice, but, can you use npm packages? I think you need to rely on an ohpm registry, right? Someone is mirroring |
Beta Was this translation helpful? Give feedback.
Hey @GarfieldJiang, as I commented in the inversify-binding-decorators repo:
Current binding decorators are implemented in the monorepo and documented here. If you were using
inversify@6
, you can continue usinginversify-binding-decorators
. If you are usinginversify@7
, check out the new package.Nice, but, can you use npm packages? I think you need to rely on an ohpm r…