mirror of
https://github.com/sern-handler/tools
synced 2026-06-06 01:16:59 +00:00
ioc deps method
This commit is contained in:
@@ -60,6 +60,10 @@ export class Container {
|
||||
this.finished_init = true;
|
||||
}
|
||||
|
||||
deps<T extends Record<string,any>>(): T {
|
||||
return Object.fromEntries(this.__singletons) as T
|
||||
}
|
||||
|
||||
async executeHooks(name: string) {
|
||||
const hookFunctions = this.hooks.get(name) || [];
|
||||
for (const hookFunction of hookFunctions) {
|
||||
|
||||
Reference in New Issue
Block a user