Refactor DI container for better structure and clarity
- Moved `TSinjex` class to `classes` directory for better organization. - Updated imports across the codebase to reflect the new location of `TSinjex`. - Introduced `Identifier` type to standardize dependency identifiers. - Enhanced JSDoc comments for improved clarity and consistency. - Adjusted error messages for `DependencyResolutionError` to provide clearer information. - Updated and expanded decorator and function types to use `Identifier` type.
This commit is contained in:
@@ -10,7 +10,7 @@ export class TSinjexError extends Error {
|
||||
*/
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
this.name = 'TSInjex';
|
||||
this.name = 'TSinjex';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export class DependencyResolutionError extends TSinjexError {
|
||||
* @param identifier **The identifier of the dependency**
|
||||
*/
|
||||
constructor(identifier: string) {
|
||||
super(`Dependency ${identifier} not found.`);
|
||||
this.name = 'TSInjexResolutionError';
|
||||
super(`Dependency ${identifier} could not be resolved.`);
|
||||
this.name = 'TSinjexResolutionError';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user