diff --git a/src/decorators/Inject.ts b/src/decorators/Inject.ts index 49c16e3..7a4ff21 100644 --- a/src/decorators/Inject.ts +++ b/src/decorators/Inject.ts @@ -52,7 +52,7 @@ export function Inject( ): ( this: TargetType, initialValue: PropertyType | undefined, - ) => PropertyType | undefined { + ) => PropertyType { const _identifier = identifier ?? context.name; if (_identifier == null && necessary === true) @@ -73,7 +73,7 @@ export function Inject( return function ( this: TargetType, initialValue: PropertyType | undefined, - ): PropertyType | undefined { + ): PropertyType { let instance: DependencyType | PropertyType | undefined; const dependency: DependencyType | undefined = tryAndCatch(