Rename DIContainer to TSInjex and refactor interfaces
- Renamed DIContainer class and related references to TSInjex to better indicate its purpose as a TypeScript-based dependency injection container. - Extracted IDependency interface to a separate file to improve modularity. - Split the ITSInjex interface into ITSInjexRegister and ITSInjexResolve, then extended them in a new ITSInjex interface to clarify the separation of concerns. - Updated tests and decorators to reflect the renaming and interface changes. - Adjusted helper, functions, and index export to align with the new TSInjex structure.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { DIContainer } from '../DIContainer';
|
||||
import { TSInjex } from '../TSInjex';
|
||||
import { InitDelegate } from '../types/InitDelegate';
|
||||
|
||||
/**
|
||||
@@ -28,7 +28,7 @@ export function RegisterInstance<
|
||||
) {
|
||||
return function (constructor: TargetType, ...args: unknown[]): void {
|
||||
// Get the instance of the DI container
|
||||
const diContainer = DIContainer.getInstance();
|
||||
const diContainer = TSInjex.getInstance();
|
||||
|
||||
// Create a proxy to instantiate the class when needed (Lazy Initialization)
|
||||
let lazyProxy: unknown = new Proxy(
|
||||
|
Reference in New Issue
Block a user