* Adding a singleton dependency and create the first instance immediately. * * @param name * @param callback * @example * * IoCService.singleton("MySingleton", () => new MySingleton())
(name: string, callback: any)
| 40 | * IoCService.singleton("MySingleton", () => new MySingleton()) |
| 41 | */ |
| 42 | static fastSingleton(name: string, callback: any) { |
| 43 | this._add(DependencyTypes.SINGLETON, name, callback); |
| 44 | this.use(name); |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Getting the service by the name. |
no test coverage detected