diff --git a/classes/classes_TSinjex.TSinjex.html b/classes/classes_TSinjex.TSinjex.html index 77cdee2..b1e3aea 100644 --- a/classes/classes_TSinjex.TSinjex.html +++ b/classes/classes_TSinjex.TSinjex.html @@ -9,7 +9,7 @@
  • register for registering a dependency (class or instance) as a function.
  • resolve for resolving a dependency as a function.
  • -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    register @@ -18,22 +18,22 @@ register resolve

    Constructors

    Properties

    _dependencies: Map<string, IDependency> = ...

    The dependencies map.

    -
    _instance: TSinjex

    The singleton instance of the TSinjex class.

    -

    Methods

    Properties

    _dependencies: Map<string, IDependency> = ...

    The dependencies map.

    +
    _instance: TSinjex

    The singleton instance of the TSinjex class.

    +

    Methods

    • Register a dependency.

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

      • dependency: T

        The dependency to register.

      • deprecated: boolean = false

        If true, the dependency is deprecated => a warning is logged when the dependency is resolved.

        -

      Returns void

    • Resolve a dependency

      +

    Returns void

    +
    diff --git a/classes/interfaces_Exceptions.DependencyResolutionError.html b/classes/interfaces_Exceptions.DependencyResolutionError.html index 9b05775..60e2466 100644 --- a/classes/interfaces_Exceptions.DependencyResolutionError.html +++ b/classes/interfaces_Exceptions.DependencyResolutionError.html @@ -1,6 +1,6 @@ DependencyResolutionError | ts-injex - v0.0.11

    Error class for dependency resolution errors in ITSinjex.

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    message name stack? @@ -9,7 +9,7 @@

    Methods

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    Returns DependencyResolutionError

    Properties

    message: string
    name: string
    stack?: string
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/classes/interfaces_Exceptions.TSinjexError.html b/classes/interfaces_Exceptions.TSinjexError.html index 4d97baa..e9b14a1 100644 --- a/classes/interfaces_Exceptions.TSinjexError.html +++ b/classes/interfaces_Exceptions.TSinjexError.html @@ -1,5 +1,5 @@ TSinjexError | ts-injex - v0.0.11

    General error class for ITSinjex interface.

    -

    Hierarchy (view full)

    Constructors

    Hierarchy (view full)

    Constructors

    Properties

    message name stack? @@ -8,7 +8,7 @@

    Methods

    Constructors

    Properties

    message: string
    name: string
    stack?: string
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    +

    Returns TSinjexError

    Properties

    message: string
    name: string
    stack?: string
    prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

    Optional override for formatting stack traces

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/coverage/badges/badge-branches.svg b/coverage/badges/badge-branches.svg index d163a6b..01d2405 100644 --- a/coverage/badges/badge-branches.svg +++ b/coverage/badges/badge-branches.svg @@ -1 +1 @@ -branches: 40.9%branches40.9% \ No newline at end of file +branches: 100%branches100% \ No newline at end of file diff --git a/coverage/badges/badge-functions.svg b/coverage/badges/badge-functions.svg index c64ca46..b53473b 100644 --- a/coverage/badges/badge-functions.svg +++ b/coverage/badges/badge-functions.svg @@ -1 +1 @@ -functions: 58.62%functions58.62% \ No newline at end of file +functions: 100%functions100% \ No newline at end of file diff --git a/coverage/badges/badge-lines.svg b/coverage/badges/badge-lines.svg index 6c87982..9c6d26b 100644 --- a/coverage/badges/badge-lines.svg +++ b/coverage/badges/badge-lines.svg @@ -1 +1 @@ -lines: 44.32%lines44.32% \ No newline at end of file +lines: 100%lines100% \ No newline at end of file diff --git a/coverage/badges/badge-statements.svg b/coverage/badges/badge-statements.svg index 299b7ac..a7d1308 100644 --- a/coverage/badges/badge-statements.svg +++ b/coverage/badges/badge-statements.svg @@ -1 +1 @@ -statements: 46%statements46% \ No newline at end of file +statements: 100%statements100% \ No newline at end of file diff --git a/coverage/coverage-summary.json b/coverage/coverage-summary.json index 9cfe1d4..d563844 100644 --- a/coverage/coverage-summary.json +++ b/coverage/coverage-summary.json @@ -1,12 +1,9 @@ -{"total": {"lines":{"total":97,"covered":43,"skipped":0,"pct":44.32},"statements":{"total":100,"covered":46,"skipped":0,"pct":46},"functions":{"total":29,"covered":17,"skipped":0,"pct":58.62},"branches":{"total":22,"covered":9,"skipped":0,"pct":40.9},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}} -,"/home/runner/work/TSinjex/TSinjex/src/index.ts": {"lines":{"total":6,"covered":0,"skipped":0,"pct":0},"functions":{"total":0,"covered":0,"skipped":0,"pct":100},"statements":{"total":6,"covered":0,"skipped":0,"pct":0},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} -,"/home/runner/work/TSinjex/TSinjex/src/__tests__/IDIContainer.spec.ts": {"lines":{"total":19,"covered":19,"skipped":0,"pct":100},"functions":{"total":7,"covered":7,"skipped":0,"pct":100},"statements":{"total":20,"covered":20,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} -,"/home/runner/work/TSinjex/TSinjex/src/classes/TSinjex.ts": {"lines":{"total":19,"covered":16,"skipped":0,"pct":84.21},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"statements":{"total":21,"covered":18,"skipped":0,"pct":85.71},"branches":{"total":11,"covered":9,"skipped":0,"pct":81.81}} -,"/home/runner/work/TSinjex/TSinjex/src/decorators/Inject.ts": {"lines":{"total":16,"covered":0,"skipped":0,"pct":0},"functions":{"total":4,"covered":0,"skipped":0,"pct":0},"statements":{"total":16,"covered":0,"skipped":0,"pct":0},"branches":{"total":5,"covered":0,"skipped":0,"pct":0}} -,"/home/runner/work/TSinjex/TSinjex/src/decorators/Register.ts": {"lines":{"total":5,"covered":0,"skipped":0,"pct":0},"functions":{"total":2,"covered":0,"skipped":0,"pct":0},"statements":{"total":5,"covered":0,"skipped":0,"pct":0},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} -,"/home/runner/work/TSinjex/TSinjex/src/decorators/RegisterInstance.ts": {"lines":{"total":18,"covered":0,"skipped":0,"pct":0},"functions":{"total":4,"covered":0,"skipped":0,"pct":0},"statements":{"total":18,"covered":0,"skipped":0,"pct":0},"branches":{"total":6,"covered":0,"skipped":0,"pct":0}} -,"/home/runner/work/TSinjex/TSinjex/src/functions/register.ts": {"lines":{"total":3,"covered":0,"skipped":0,"pct":0},"functions":{"total":1,"covered":0,"skipped":0,"pct":0},"statements":{"total":3,"covered":0,"skipped":0,"pct":0},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} -,"/home/runner/work/TSinjex/TSinjex/src/functions/resolve.ts": {"lines":{"total":3,"covered":0,"skipped":0,"pct":0},"functions":{"total":1,"covered":0,"skipped":0,"pct":0},"statements":{"total":3,"covered":0,"skipped":0,"pct":0},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} -,"/home/runner/work/TSinjex/TSinjex/src/helper/ImplementsStatic.ts": {"lines":{"total":2,"covered":2,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} +{"total": {"lines":{"total":70,"covered":70,"skipped":0,"pct":100},"statements":{"total":72,"covered":72,"skipped":0,"pct":100},"functions":{"total":20,"covered":20,"skipped":0,"pct":100},"branches":{"total":22,"covered":22,"skipped":0,"pct":100},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}} +,"/home/runner/work/TSinjex/TSinjex/src/classes/TSinjex.ts": {"lines":{"total":19,"covered":19,"skipped":0,"pct":100},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"statements":{"total":21,"covered":21,"skipped":0,"pct":100},"branches":{"total":11,"covered":11,"skipped":0,"pct":100}} +,"/home/runner/work/TSinjex/TSinjex/src/decorators/Inject.ts": {"lines":{"total":16,"covered":16,"skipped":0,"pct":100},"functions":{"total":4,"covered":4,"skipped":0,"pct":100},"statements":{"total":16,"covered":16,"skipped":0,"pct":100},"branches":{"total":5,"covered":5,"skipped":0,"pct":100}} +,"/home/runner/work/TSinjex/TSinjex/src/decorators/Register.ts": {"lines":{"total":5,"covered":5,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":5,"covered":5,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} +,"/home/runner/work/TSinjex/TSinjex/src/decorators/RegisterInstance.ts": {"lines":{"total":18,"covered":18,"skipped":0,"pct":100},"functions":{"total":4,"covered":4,"skipped":0,"pct":100},"statements":{"total":18,"covered":18,"skipped":0,"pct":100},"branches":{"total":6,"covered":6,"skipped":0,"pct":100}} +,"/home/runner/work/TSinjex/TSinjex/src/functions/register.ts": {"lines":{"total":3,"covered":3,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":3,"covered":3,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} +,"/home/runner/work/TSinjex/TSinjex/src/functions/resolve.ts": {"lines":{"total":3,"covered":3,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":3,"covered":3,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} ,"/home/runner/work/TSinjex/TSinjex/src/interfaces/Exceptions.ts": {"lines":{"total":6,"covered":6,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":6,"covered":6,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} } diff --git a/coverage/lcov-report/src/classes/TSinjex.ts.html b/coverage/lcov-report/classes/TSinjex.ts.html similarity index 89% rename from coverage/lcov-report/src/classes/TSinjex.ts.html rename to coverage/lcov-report/classes/TSinjex.ts.html index b17b1f0..14ce237 100644 --- a/coverage/lcov-report/src/classes/TSinjex.ts.html +++ b/coverage/lcov-report/classes/TSinjex.ts.html @@ -3,15 +3,15 @@ - Code coverage report for src/classes/TSinjex.ts + Code coverage report for classes/TSinjex.ts - - - + + + @@ -19,20 +19,20 @@
    -

    All files / src/classes TSinjex.ts

    +

    All files / classes TSinjex.ts

    - 85.71% + 100% Statements - 18/21 + 21/21
    - 81.81% + 100% Branches - 9/11 + 11/11
    @@ -44,9 +44,9 @@
    - 84.21% + 100% Lines - 16/19 + 19/19
    @@ -196,8 +196,8 @@       -1x -1x +3x +3x       @@ -214,105 +214,105 @@       -1x -  -  -  -  -  -  -  -  -1x -  -  -  -  -  -  -  -  -  -  -  -  -  -6x -1x -  -  -6x -  -  -  -  -  -  -  -  -  -  -  -  -1x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -2x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -1x -  -  -  -  -  -  -  -  -  3x   -3x +  +  +  +  +  +  +  +16x +  +  +  +  +  +  +  +  +  +  +  +  +  +33x +16x +  +  +33x +  +  +  +  +  +  +  +  +  +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +11x +  +  +  +  +  +  +  +  +  +18x +  +18x +2x +16x 1x -2x -      -2x -  +15x +1x     -  +1x     -2x +15x       @@ -428,15 +428,15 @@ export class TSinjex implements ITSinjex {   if (necessary && !dependency) { throw new DependencyResolutionError(identifier); - } else Iif (!dependency) { - return undefined; + } else if (!dependency) { + return undefined; }   - Iif (dependency.deprecated) { - console.warn(`Dependency ${identifier} is deprecated`); + if (dependency.deprecated) { + console.warn(`Dependency ${identifier} is deprecated`);   // Remove the deprecation warning; it should only be logged once. - dependency.deprecated = false; + dependency.deprecated = false; }   return dependency.dependency as T; @@ -451,16 +451,16 @@ export class TSinjex implements ITSinjex { - + - - + +
    Zur TypeDoc-Dokumentation
    \ No newline at end of file diff --git a/coverage/lcov-report/src/__tests__/index.html b/coverage/lcov-report/classes/index.html similarity index 78% rename from coverage/lcov-report/src/__tests__/index.html rename to coverage/lcov-report/classes/index.html index 8fa198e..1e04594 100644 --- a/coverage/lcov-report/src/__tests__/index.html +++ b/coverage/lcov-report/classes/index.html @@ -3,15 +3,15 @@ - Code coverage report for src/__tests__ + Code coverage report for classes - - - + + + @@ -19,27 +19,27 @@
    -

    All files src/__tests__

    +

    All files classes

    100% Statements - 20/20 + 21/21
    100% Branches - 0/0 + 11/11
    100% Functions - 7/7 + 6/6
    @@ -79,16 +79,16 @@ - IDIContainer.spec.ts + TSinjex.ts
    100% - 20/20 + 21/21 100% - 0/0 + 11/11 100% - 7/7 + 6/6 100% 19/19 @@ -101,16 +101,16 @@ - + - - + + \ No newline at end of file diff --git a/coverage/lcov-report/src/decorators/Inject.ts.html b/coverage/lcov-report/decorators/Inject.ts.html similarity index 71% rename from coverage/lcov-report/src/decorators/Inject.ts.html rename to coverage/lcov-report/decorators/Inject.ts.html index 5292109..961112e 100644 --- a/coverage/lcov-report/src/decorators/Inject.ts.html +++ b/coverage/lcov-report/decorators/Inject.ts.html @@ -3,15 +3,15 @@ - Code coverage report for src/decorators/Inject.ts + Code coverage report for decorators/Inject.ts - - - + + + @@ -19,34 +19,34 @@
    -

    All files / src/decorators Inject.ts

    +

    All files / decorators Inject.ts

    - 0% + 100% Statements - 0/16 + 16/16
    - 0% + 100% Branches - 0/5 + 5/5
    - 0% + 100% Functions - 0/4 + 4/4
    - 0% + 100% Lines - 0/16 + 16/16
    @@ -61,7 +61,7 @@
    -
    +
    1 2 @@ -141,7 +141,7 @@ 76 77 78  -  +1x       @@ -171,42 +171,42 @@       -  +1x         -  +4x   -  +4x   -  +4x       -  -  +4x +4x       -  +4x     -  -  -  -  +4x +4x +2x +2x   -  -  +1x +1x       -  +2x       -  +2x       @@ -218,7 +218,7 @@      
    import { Identifier } from 'src/types/Identifier';
    -import { TSinjex } from '../classes/TSinjex';
    +import { TSinjex } from '../classes/TSinjex';
     import { InitDelegate } from '../types/InitDelegate';
      
     /**
    @@ -248,42 +248,42 @@ import { InitDelegate } from '../types/InitDelegate';
      * }
      * ```
      */
    -export function Inject<T, U>(
    +export function Inject<T, U>(
         identifier: Identifier,
         init?: InitDelegate<T, U>,
    -    necessary = true,
    +    necessary = true,
     ) {
    -    return function (target: unknown, propertyKey: string | symbol): void {
    +    return function (target: unknown, propertyKey: string | symbol): void {
             // Unique symbol to store the private property
    -        const privatePropertyKey: unique symbol = Symbol();
    +        const privatePropertyKey: unique symbol = Symbol();
             // Get the DI container instance
    -        const diContainer = TSinjex.getInstance();
    +        const diContainer = TSinjex.getInstance();
      
             // Function to evaluate the dependency lazily
             // to avoid circular dependencies, not found dependencies, etc.
    -        const evaluate = (): T | undefined => {
    -            return diContainer.resolve<T>(identifier, necessary);
    +        const evaluate = (): T | undefined => {
    +            return diContainer.resolve<T>(identifier, necessary);
             };
      
             // Define the property
    -        Object.defineProperty(target, propertyKey, {
    -            get() {
    +        Object.defineProperty(target, propertyKey, {
    +            get() {
                     // If the property is not defined, evaluate the dependency
    -                Iif (!this.hasOwnProperty(privatePropertyKey)) {
    -                    if (init) {
    -                        try {
    -                            this[privatePropertyKey] = init(evaluate() as T);
    +                if (!this.hasOwnProperty(privatePropertyKey)) {
    +                    if (init) {
    +                        try {
    +                            this[privatePropertyKey] = init(evaluate() as T);
                             } catch (error) {
    -                            Iif (necessary) {
    -                                throw error;
    +                            if (necessary) {
    +                                throw error;
                                 }
                             }
                         } else {
    -                        this[privatePropertyKey] = evaluate();
    +                        this[privatePropertyKey] = evaluate();
                         }
                     }
      
    -                return this[privatePropertyKey];
    +                return this[privatePropertyKey];
                 },
                 // Not necessary to set the property
                 // set(value: PropertieType) {
    @@ -301,16 +301,16 @@ import { InitDelegate } from '../types/InitDelegate';
                 
    -        
    +        
             
    -        
    -        
    +        
    +        
         
     
         
    \ No newline at end of file
    diff --git a/coverage/lcov-report/src/decorators/Register.ts.html b/coverage/lcov-report/decorators/Register.ts.html
    similarity index 74%
    rename from coverage/lcov-report/src/decorators/Register.ts.html
    rename to coverage/lcov-report/decorators/Register.ts.html
    index b980de5..8a69c64 100644
    --- a/coverage/lcov-report/src/decorators/Register.ts.html
    +++ b/coverage/lcov-report/decorators/Register.ts.html
    @@ -3,15 +3,15 @@
     
     
     
    -    Code coverage report for src/decorators/Register.ts
    +    Code coverage report for decorators/Register.ts
         
    -    
    -    
    -    
    +    
    +    
    +    
         
         
     
    @@ -19,13 +19,13 @@
     
     
    -

    All files / src/decorators Register.ts

    +

    All files / decorators Register.ts

    - 0% + 100% Statements - 0/5 + 5/5
    @@ -37,16 +37,16 @@
    - 0% + 100% Functions - 0/2 + 2/2
    - 0% + 100% Lines - 0/5 + 5/5
    @@ -61,7 +61,7 @@
    -
    +
    1 2 @@ -94,7 +94,7 @@ 29 30 31  -  +1x       @@ -112,19 +112,19 @@       -  +1x     -  +1x   -  +1x     -  +1x      
    import { Identifier } from 'src/types/Identifier';
    -import { TSinjex } from '../classes/TSinjex';
    +import { TSinjex } from '../classes/TSinjex';
      
     /**
      * A decorator to register a class in the **TSinjex** DI (Dependency Injection) container.
    @@ -142,15 +142,15 @@
      * }
      * ```
      */
    -export function Register<
    +export function Register<
         TargetType extends new (...args: unknown[]) => InstanceType<TargetType>,
     >(identifier: Identifier, deprecated?: boolean) {
    -    return function (constructor: TargetType, ...args: unknown[]): void {
    +    return function (constructor: TargetType, ...args: unknown[]): void {
             // Get the instance of the DI container
    -        const diContainer = TSinjex.getInstance();
    +        const diContainer = TSinjex.getInstance();
      
             // Register the class in the DI container
    -        diContainer.register(identifier, constructor, deprecated);
    +        diContainer.register(identifier, constructor, deprecated);
         };
     }
      
    @@ -160,16 +160,16 @@ - + - - + + \ No newline at end of file diff --git a/coverage/lcov-report/src/decorators/RegisterInstance.ts.html b/coverage/lcov-report/decorators/RegisterInstance.ts.html similarity index 68% rename from coverage/lcov-report/src/decorators/RegisterInstance.ts.html rename to coverage/lcov-report/decorators/RegisterInstance.ts.html index 4a551bd..f9e1a5a 100644 --- a/coverage/lcov-report/src/decorators/RegisterInstance.ts.html +++ b/coverage/lcov-report/decorators/RegisterInstance.ts.html @@ -3,15 +3,15 @@ - Code coverage report for src/decorators/RegisterInstance.ts + Code coverage report for decorators/RegisterInstance.ts - - - + + + @@ -19,34 +19,34 @@
    -

    All files / src/decorators RegisterInstance.ts

    +

    All files / decorators RegisterInstance.ts

    - 0% + 100% Statements - 0/18 + 18/18
    - 0% + 100% Branches - 0/6 + 6/6
    - 0% + 100% Functions - 0/4 + 4/4
    - 0% + 100% Lines - 0/18 + 18/18
    @@ -61,7 +61,7 @@
    -
    +
    1 2 @@ -137,7 +137,7 @@ 72 73 74  -  +1x       @@ -157,7 +157,7 @@       -  +1x       @@ -166,51 +166,51 @@       -  +4x   -  +4x       -  +4x       -  -  -  +4x +2x +1x   -  +1x     -  +4x     -  +4x     -  -  -  +2x +2x +1x   -  +1x     -  +2x     -  +2x             -  +4x      
    import { Identifier } from 'src/types/Identifier';
    -import { TSinjex } from '../classes/TSinjex';
    +import { TSinjex } from '../classes/TSinjex';
     import { InitDelegate } from '../types/InitDelegate';
      
     /**
    @@ -230,7 +230,7 @@ import { InitDelegate } from '../types/InitDelegate';
      * }
      * ```
      */
    -export function RegisterInstance<
    +export function RegisterInstance<
         TargetType extends new (..._args: unknown[]) => InstanceType<TargetType>,
     >(
         identifier: Identifier,
    @@ -239,47 +239,47 @@ import { InitDelegate } from '../types/InitDelegate';
             InstanceType<TargetType>
         >,
     ) {
    -    return function (constructor: TargetType, ...args: unknown[]): void {
    +    return function (constructor: TargetType, ...args: unknown[]): void {
             // Get the instance of the DI container
    -        const diContainer = TSinjex.getInstance();
    +        const diContainer = TSinjex.getInstance();
             let instance: InstanceType<TargetType>;
      
             // Create a proxy to instantiate the class when needed (Lazy Initialization)
    -        let lazyProxy: unknown = new Proxy(
    +        let lazyProxy: unknown = new Proxy(
                 {},
                 {
    -                get(target, prop, receiver) {
    -                    Iif (instance == null) {
    -                        if (init) {
    -                            instance = init(constructor);
    +                get(target, prop, receiver) {
    +                    if (instance == null) {
    +                        if (init) {
    +                            instance = init(constructor);
                             } else {
    -                            instance = new constructor(...args);
    +                            instance = new constructor(...args);
                             }
                         }
    -                    lazyProxy = instance;
    +                    lazyProxy = instance;
      
                         // Return the requested property of the instance
    -                    return instance[prop as keyof InstanceType<TargetType>];
    +                    return instance[prop as keyof InstanceType<TargetType>];
                     },
    -                set(target, prop, value, receiver) {
    -                    Iif (instance == null) {
    -                        if (init) {
    -                            instance = init(constructor);
    +                set(target, prop, value, receiver) {
    +                    if (instance == null) {
    +                        if (init) {
    +                            instance = init(constructor);
                             } else {
    -                            instance = new constructor(...args);
    +                            instance = new constructor(...args);
                             }
                         }
    -                    lazyProxy = instance;
    +                    lazyProxy = instance;
      
                         // Set the requested property of the instance
    -                    return (instance[prop as keyof InstanceType<TargetType>] =
    +                    return (instance[prop as keyof InstanceType<TargetType>] =
                             value);
                     },
                 },
             );
      
             // Register the lazy proxy in the DI container
    -        diContainer.register(identifier, lazyProxy);
    +        diContainer.register(identifier, lazyProxy);
         };
     }
      
    @@ -289,16 +289,16 @@ import { InitDelegate } from '../types/InitDelegate'; - + - - + + \ No newline at end of file diff --git a/coverage/lcov-report/src/index.html b/coverage/lcov-report/decorators/index.html similarity index 59% rename from coverage/lcov-report/src/index.html rename to coverage/lcov-report/decorators/index.html index 224ff74..1715132 100644 --- a/coverage/lcov-report/src/index.html +++ b/coverage/lcov-report/decorators/index.html @@ -3,7 +3,7 @@ - Code coverage report for src + Code coverage report for decorators @@ -19,34 +19,34 @@
    -

    All files src

    +

    All files decorators

    - 0% + 100% Statements - 0/6 + 39/39
    100% Branches - 0/0 + 11/11
    100% Functions - 0/0 + 10/10
    - 0% + 100% Lines - 0/6 + 39/39
    @@ -61,7 +61,7 @@
    -
    +
    @@ -79,18 +79,48 @@ - - + - - + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + @@ -101,7 +131,7 @@ + - - + + \ No newline at end of file diff --git a/coverage/lcov-report/src/functions/register.ts.html b/coverage/lcov-report/functions/register.ts.html similarity index 82% rename from coverage/lcov-report/src/functions/register.ts.html rename to coverage/lcov-report/functions/register.ts.html index 58a052b..a8db7c4 100644 --- a/coverage/lcov-report/src/functions/register.ts.html +++ b/coverage/lcov-report/functions/register.ts.html @@ -3,15 +3,15 @@ - Code coverage report for src/functions/register.ts + Code coverage report for functions/register.ts - - - + + + @@ -19,13 +19,13 @@
    -

    All files / src/functions register.ts

    +

    All files / functions register.ts

    - 0% + 100% Statements - 0/3 + 3/3
    @@ -37,16 +37,16 @@
    - 0% + 100% Functions - 0/1 + 1/1
    - 0% + 100% Lines - 0/3 + 3/3
    @@ -61,7 +61,7 @@
    -
    +
    index.ts -
    +
    Inject.ts +
    0%0/6100%16/16100%5/5100%4/4100%16/16
    Register.ts +
    +
    100%5/5 100% 0/0 100%0/00%0/62/2100%5/5
    RegisterInstance.ts +
    +
    100%18/18100%6/6100%4/4100%18/18
    1 2 @@ -103,7 +103,7 @@ 38 39 40  -  +1x       @@ -134,15 +134,15 @@       -  +1x         -  +1x    
    import { Identifier } from 'src/types/Identifier';
    -import { TSinjex } from '../classes/TSinjex';
    +import { TSinjex } from '../classes/TSinjex';
      
     /**
      * Register a dependency.
    @@ -173,12 +173,12 @@ export function register<T>(
      * @param deprecated If true, the dependency is deprecated => a warning
      * is logged when the dependency is resolved.
      */
    -export function register<T>(
    +export function register<T>(
         identifier: Identifier,
         dependency: T,
         deprecated?: boolean,
     ): void {
    -    TSinjex.getInstance().register(identifier, dependency, deprecated);
    +    TSinjex.getInstance().register(identifier, dependency, deprecated);
     }
      
    @@ -187,16 +187,16 @@ export function register<T>( - + - - + + \ No newline at end of file diff --git a/coverage/lcov-report/src/functions/resolve.ts.html b/coverage/lcov-report/functions/resolve.ts.html similarity index 82% rename from coverage/lcov-report/src/functions/resolve.ts.html rename to coverage/lcov-report/functions/resolve.ts.html index 3534121..fbe9093 100644 --- a/coverage/lcov-report/src/functions/resolve.ts.html +++ b/coverage/lcov-report/functions/resolve.ts.html @@ -3,15 +3,15 @@ - Code coverage report for src/functions/resolve.ts + Code coverage report for functions/resolve.ts - - - + + + @@ -19,13 +19,13 @@
    -

    All files / src/functions resolve.ts

    +

    All files / functions resolve.ts

    - 0% + 100% Statements - 0/3 + 3/3
    @@ -37,16 +37,16 @@
    - 0% + 100% Functions - 0/1 + 1/1
    - 0% + 100% Lines - 0/3 + 3/3
    @@ -61,7 +61,7 @@
    -
    +
    1 2 @@ -104,7 +104,7 @@ 39 40 41  -  +1x       @@ -137,14 +137,14 @@       -  +1x       -  +1x    
    import { Identifier } from 'src/types/Identifier';
    -import { TSinjex } from '../classes/TSinjex';
    +import { TSinjex } from '../classes/TSinjex';
     import { DependencyResolutionError } from '../interfaces/Exceptions';
      
     /**
    @@ -177,11 +177,11 @@ export function resolve<T>(
      * and not found, or throws an error if the dependency is necessary and not found.
      * @throws A {@link DependencyResolutionError} if the dependency is not found and necessary.
      */
    -export function resolve<T>(
    +export function resolve<T>(
         identifier: Identifier,
         necessary?: boolean,
     ): T | undefined {
    -    return TSinjex.getInstance().resolve<T>(identifier, necessary);
    +    return TSinjex.getInstance().resolve<T>(identifier, necessary);
     }
      
    @@ -190,16 +190,16 @@ export function resolve<T>( - + - - + + \ No newline at end of file diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html index fed9bbe..29ad2ad 100644 --- a/coverage/lcov-report/index.html +++ b/coverage/lcov-report/index.html @@ -23,30 +23,30 @@
    - 46% + 100% Statements - 46/100 + 72/72
    - 40.9% + 100% Branches - 9/22 + 22/22
    - 58.62% + 100% Functions - 17/29 + 20/20
    - 44.32% + 100% Lines - 43/97 + 70/70
    @@ -61,7 +61,7 @@
    -
    +
    @@ -79,97 +79,52 @@ - - - - - - - - - - - - - - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + - + - + @@ -191,7 +146,7 @@ + - - + + \ No newline at end of file diff --git a/coverage/lcov-report/src/interfaces/index.html b/coverage/lcov-report/interfaces/index.html similarity index 87% rename from coverage/lcov-report/src/interfaces/index.html rename to coverage/lcov-report/interfaces/index.html index 71c123d..2ab14b8 100644 --- a/coverage/lcov-report/src/interfaces/index.html +++ b/coverage/lcov-report/interfaces/index.html @@ -3,15 +3,15 @@ - Code coverage report for src/interfaces + Code coverage report for interfaces - - - + + + @@ -19,7 +19,7 @@
    -

    All files src/interfaces

    +

    All files interfaces

    @@ -101,16 +101,16 @@ - + - - + + \ No newline at end of file diff --git a/coverage/lcov-report/src/__tests__/IDIContainer.spec.ts.html b/coverage/lcov-report/src/__tests__/IDIContainer.spec.ts.html deleted file mode 100644 index df967fa..0000000 --- a/coverage/lcov-report/src/__tests__/IDIContainer.spec.ts.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - Code coverage report for src/__tests__/IDIContainer.spec.ts - - - - - - - - - -
    -
    -

    All files / src/__tests__ IDIContainer.spec.ts

    -
    - -
    - 100% - Statements - 20/20 -
    - - -
    - 100% - Branches - 0/0 -
    - - -
    - 100% - Functions - 7/7 -
    - - -
    - 100% - Lines - 19/19 -
    - - -
    -

    - Press n or j to go to the next uncovered block, b, p or k for the previous block. -

    - -
    -
    -
    src -
    -
    0%0/6100%0/0100%0/00%0/6
    src/__tests__classes
    100%20/2021/21 100%0/011/11 100%7/76/6 100% 19/19
    src/classes -
    -
    85.71%18/2181.81%9/11100%6/684.21%16/19
    src/decorators -
    -
    0%0/390%0/110%0/100%0/39
    src/functions -
    -
    0%0/6100%0/00%0/20%0/6
    src/helperdecorators
    100%2/239/39100%11/11100%10/10100%39/39
    functions +
    +
    100%6/6 100% 0/0 100% 2/2 100%2/26/6
    src/interfacesinterfaces
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47  -  -  -  -  -  -  -1x -1x -  -  -1x -3x -  -  -1x -1x -1x -  -1x -  -  -1x -1x -  -  -1x -1x -1x -  -1x -  -  -1x -1x -  -  -1x -1x -  -1x -  -  -  -  -  - 
    import { ITSinjex_, ITSinjex } from '../interfaces/ITSinjex';
    - 
    -/**
    - * Test the implementation of a DIContainer
    - * @param Container The DIContainer implementation to test.
    - * Must implement {@link ITSinjex}, {@link ITSinjex_}
    - */
    -export function test_IDIContainer(Container: ITSinjex_): void {
    -    describe('IDIContainer Implementation Tests', () => {
    -        let container: ITSinjex;
    - 
    -        beforeEach(() => {
    -            container = Container.getInstance();
    -        });
    - 
    -        it('should register and resolve a dependency', () => {
    -            const identifier = 'myDependency';
    -            const dependency = { value: 42 };
    - 
    -            container.register(identifier, dependency);
    - 
    -            const resolvedDependency =
    -                container.resolve<typeof dependency>(identifier);
    -            expect(resolvedDependency).toBe(dependency);
    -        });
    - 
    -        it('should register and resolve a dependency static', () => {
    -            const identifier = 'myDependency';
    -            const dependency = { value: 42 };
    - 
    -            Container.register(identifier, dependency);
    - 
    -            const resolvedDependency =
    -                Container.resolve<typeof dependency>(identifier);
    -            expect(resolvedDependency).toBe(dependency);
    -        });
    - 
    -        it('should throw an error when resolving a non-registered dependency static', () => {
    -            const identifier = 'nonExistentDependency';
    - 
    -            expect(() => Container.resolve<unknown>(identifier)).toThrow();
    -        });
    - 
    -        // Add more tests as necessary
    -    });
    -}
    - 
    - -
    -
    - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/classes/index.html b/coverage/lcov-report/src/classes/index.html deleted file mode 100644 index 2638ae9..0000000 --- a/coverage/lcov-report/src/classes/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Code coverage report for src/classes - - - - - - - - - -
    -
    -

    All files src/classes

    -
    - -
    - 85.71% - Statements - 18/21 -
    - - -
    - 81.81% - Branches - 9/11 -
    - - -
    - 100% - Functions - 6/6 -
    - - -
    - 84.21% - Lines - 16/19 -
    - - -
    -

    - Press n or j to go to the next uncovered block, b, p or k for the previous block. -

    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    TSinjex.ts -
    -
    85.71%18/2181.81%9/11100%6/684.21%16/19
    -
    -
    -
    - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/decorators/index.html b/coverage/lcov-report/src/decorators/index.html deleted file mode 100644 index 482118d..0000000 --- a/coverage/lcov-report/src/decorators/index.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - Code coverage report for src/decorators - - - - - - - - - -
    -
    -

    All files src/decorators

    -
    - -
    - 0% - Statements - 0/39 -
    - - -
    - 0% - Branches - 0/11 -
    - - -
    - 0% - Functions - 0/10 -
    - - -
    - 0% - Lines - 0/39 -
    - - -
    -

    - Press n or j to go to the next uncovered block, b, p or k for the previous block. -

    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    Inject.ts -
    -
    0%0/160%0/50%0/40%0/16
    Register.ts -
    -
    0%0/5100%0/00%0/20%0/5
    RegisterInstance.ts -
    -
    0%0/180%0/60%0/40%0/18
    -
    -
    -
    - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/functions/index.html b/coverage/lcov-report/src/functions/index.html deleted file mode 100644 index a9b8949..0000000 --- a/coverage/lcov-report/src/functions/index.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - Code coverage report for src/functions - - - - - - - - - -
    -
    -

    All files src/functions

    -
    - -
    - 0% - Statements - 0/6 -
    - - -
    - 100% - Branches - 0/0 -
    - - -
    - 0% - Functions - 0/2 -
    - - -
    - 0% - Lines - 0/6 -
    - - -
    -

    - Press n or j to go to the next uncovered block, b, p or k for the previous block. -

    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FileStatementsBranchesFunctionsLines
    register.ts -
    -
    0%0/3100%0/00%0/10%0/3
    resolve.ts -
    -
    0%0/3100%0/00%0/10%0/3
    -
    -
    -
    - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/helper/ImplementsStatic.ts.html b/coverage/lcov-report/src/helper/ImplementsStatic.ts.html deleted file mode 100644 index e5f5e8f..0000000 --- a/coverage/lcov-report/src/helper/ImplementsStatic.ts.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - Code coverage report for src/helper/ImplementsStatic.ts - - - - - - - - - -
    -
    -

    All files / src/helper ImplementsStatic.ts

    -
    - -
    - 100% - Statements - 2/2 -
    - - -
    - 100% - Branches - 0/0 -
    - - -
    - 100% - Functions - 2/2 -
    - - -
    - 100% - Lines - 2/2 -
    - - -
    -

    - Press n or j to go to the next uncovered block, b, p or k for the previous block. -

    - -
    -
    -
    
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9  -  -  -  -  -1x -1x -  - 
    /**
    - * Decorator to enforce static implementation of an interface.
    - * Warns on compile time if the interface is not implemented.
    - * @returns A decorator function
    - */
    -export function ImplementsStatic<I>() {
    -    return <T extends I>(constructor: T, ...args: unknown[]) => {};
    -}
    - 
    - -
    -
    - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/index.ts.html b/coverage/lcov-report/src/index.ts.html deleted file mode 100644 index 442adca..0000000 --- a/coverage/lcov-report/src/index.ts.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - Code coverage report for src/index.ts - - - - - - - - - -
    -
    -

    All files / src index.ts

    -
    - -
    - 0% - Statements - 0/6 -
    - - -
    - 100% - Branches - 0/0 -
    - - -
    - 100% - Functions - 0/0 -
    - - -
    - 0% - Lines - 0/6 -
    - - -
    -

    - Press n or j to go to the next uncovered block, b, p or k for the previous block. -

    - -
    -
    -
    
    -
    1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
    // Main
    -export * from './classes/TSinjex';
    - 
    -// Decorators
    -export * from './decorators/Inject';
    -export * from './decorators/Register';
    -export * from './decorators/RegisterInstance';
    - 
    -// Functions
    -export * from './functions/resolve';
    -export * from './functions/register';
    - 
    -// Interfaces & Types
    -export type * from './interfaces/ITSinjex';
    -export type * from './types/InitDelegate';
    -export type * from './types/GenericContructor';
    - 
    - -
    -
    - - - - - - - - \ No newline at end of file diff --git a/coverage/lcov.info b/coverage/lcov.info index 7e9b8db..732f466 100644 --- a/coverage/lcov.info +++ b/coverage/lcov.info @@ -1,61 +1,4 @@ TN: -SF:TSinjex/src/index.ts -FNF:0 -FNH:0 -DA:2,0 -DA:5,0 -DA:6,0 -DA:7,0 -DA:10,0 -DA:11,0 -LF:6 -LH:0 -BRF:0 -BRH:0 -end_of_record -TN: -SF:TSinjex/src/__tests__/IDIContainer.spec.ts -FN:8,test_IDIContainer -FN:9,(anonymous_1) -FN:12,(anonymous_2) -FN:16,(anonymous_3) -FN:27,(anonymous_4) -FN:38,(anonymous_5) -FN:41,(anonymous_6) -FNF:7 -FNH:7 -FNDA:1,test_IDIContainer -FNDA:1,(anonymous_1) -FNDA:3,(anonymous_2) -FNDA:1,(anonymous_3) -FNDA:1,(anonymous_4) -FNDA:1,(anonymous_5) -FNDA:1,(anonymous_6) -DA:8,1 -DA:9,1 -DA:12,1 -DA:13,3 -DA:16,1 -DA:17,1 -DA:18,1 -DA:20,1 -DA:23,1 -DA:24,1 -DA:27,1 -DA:28,1 -DA:29,1 -DA:31,1 -DA:34,1 -DA:35,1 -DA:38,1 -DA:39,1 -DA:41,1 -LF:19 -LH:19 -BRF:0 -BRH:0 -end_of_record -TN: SF:TSinjex/src/classes/TSinjex.ts FN:39,(anonymous_0) FN:47,(anonymous_1) @@ -65,46 +8,46 @@ FN:93,(anonymous_4) FN:107,(anonymous_5) FNF:6 FNH:6 -FNDA:1,(anonymous_0) -FNDA:6,(anonymous_1) -FNDA:1,(anonymous_2) -FNDA:2,(anonymous_3) -FNDA:1,(anonymous_4) -FNDA:3,(anonymous_5) -DA:7,1 -DA:8,1 -DA:25,1 -DA:34,1 -DA:48,6 -DA:49,1 -DA:52,6 -DA:65,1 -DA:80,2 -DA:98,1 -DA:108,3 -DA:110,3 -DA:111,1 -DA:112,2 -DA:113,0 -DA:116,2 -DA:117,0 -DA:120,0 -DA:123,2 +FNDA:16,(anonymous_0) +FNDA:33,(anonymous_1) +FNDA:2,(anonymous_2) +FNDA:4,(anonymous_3) +FNDA:11,(anonymous_4) +FNDA:18,(anonymous_5) +DA:7,3 +DA:8,3 +DA:25,3 +DA:34,16 +DA:48,33 +DA:49,16 +DA:52,33 +DA:65,2 +DA:80,4 +DA:98,11 +DA:108,18 +DA:110,18 +DA:111,2 +DA:112,16 +DA:113,1 +DA:116,15 +DA:117,1 +DA:120,1 +DA:123,15 LF:19 -LH:16 -BRDA:48,0,0,1 +LH:19 +BRDA:48,0,0,16 BRDA:63,1,0,1 -BRDA:78,2,0,2 -BRDA:96,3,0,1 -BRDA:107,4,0,1 -BRDA:110,5,0,1 -BRDA:110,5,1,2 -BRDA:110,6,0,3 -BRDA:110,6,1,3 -BRDA:112,7,0,0 -BRDA:116,8,0,0 +BRDA:78,2,0,3 +BRDA:96,3,0,10 +BRDA:107,4,0,10 +BRDA:110,5,0,2 +BRDA:110,5,1,16 +BRDA:110,6,0,18 +BRDA:110,6,1,17 +BRDA:112,7,0,1 +BRDA:116,8,0,1 BRF:11 -BRH:9 +BRH:11 end_of_record TN: SF:TSinjex/src/decorators/Inject.ts @@ -113,52 +56,52 @@ FN:37,(anonymous_1) FN:45,(anonymous_2) FN:51,(anonymous_3) FNF:4 -FNH:0 -FNDA:0,Inject -FNDA:0,(anonymous_1) -FNDA:0,(anonymous_2) -FNDA:0,(anonymous_3) -DA:2,0 -DA:32,0 -DA:37,0 -DA:39,0 -DA:41,0 -DA:45,0 -DA:46,0 -DA:50,0 -DA:53,0 -DA:54,0 -DA:55,0 -DA:56,0 -DA:58,0 -DA:59,0 -DA:63,0 -DA:67,0 +FNH:4 +FNDA:4,Inject +FNDA:4,(anonymous_1) +FNDA:4,(anonymous_2) +FNDA:4,(anonymous_3) +DA:2,1 +DA:32,1 +DA:37,4 +DA:39,4 +DA:41,4 +DA:45,4 +DA:46,4 +DA:50,4 +DA:53,4 +DA:54,4 +DA:55,2 +DA:56,2 +DA:58,1 +DA:59,1 +DA:63,2 +DA:67,2 LF:16 -LH:0 -BRDA:35,0,0,0 -BRDA:53,1,0,0 -BRDA:54,2,0,0 -BRDA:54,2,1,0 -BRDA:58,3,0,0 +LH:16 +BRDA:35,0,0,3 +BRDA:53,1,0,4 +BRDA:54,2,0,2 +BRDA:54,2,1,2 +BRDA:58,3,0,1 BRF:5 -BRH:0 +BRH:5 end_of_record TN: SF:TSinjex/src/decorators/Register.ts FN:20,Register FN:23,(anonymous_1) FNF:2 -FNH:0 -FNDA:0,Register -FNDA:0,(anonymous_1) -DA:2,0 -DA:20,0 -DA:23,0 -DA:25,0 -DA:28,0 +FNH:2 +FNDA:1,Register +FNDA:1,(anonymous_1) +DA:2,1 +DA:20,1 +DA:23,1 +DA:25,1 +DA:28,1 LF:5 -LH:0 +LH:5 BRF:0 BRH:0 end_of_record @@ -169,51 +112,51 @@ FN:31,(anonymous_1) FN:40,(anonymous_2) FN:53,(anonymous_3) FNF:4 -FNH:0 -FNDA:0,RegisterInstance -FNDA:0,(anonymous_1) -FNDA:0,(anonymous_2) -FNDA:0,(anonymous_3) -DA:2,0 -DA:22,0 -DA:31,0 -DA:33,0 -DA:37,0 -DA:41,0 -DA:42,0 -DA:43,0 -DA:45,0 -DA:48,0 -DA:51,0 -DA:54,0 -DA:55,0 -DA:56,0 -DA:58,0 -DA:61,0 -DA:64,0 -DA:71,0 +FNH:4 +FNDA:4,RegisterInstance +FNDA:4,(anonymous_1) +FNDA:4,(anonymous_2) +FNDA:2,(anonymous_3) +DA:2,1 +DA:22,1 +DA:31,4 +DA:33,4 +DA:37,4 +DA:41,4 +DA:42,2 +DA:43,1 +DA:45,1 +DA:48,4 +DA:51,4 +DA:54,2 +DA:55,2 +DA:56,1 +DA:58,1 +DA:61,2 +DA:64,2 +DA:71,4 LF:18 -LH:0 -BRDA:41,0,0,0 -BRDA:42,1,0,0 -BRDA:42,1,1,0 -BRDA:54,2,0,0 -BRDA:55,3,0,0 -BRDA:55,3,1,0 +LH:18 +BRDA:41,0,0,2 +BRDA:42,1,0,1 +BRDA:42,1,1,1 +BRDA:54,2,0,2 +BRDA:55,3,0,1 +BRDA:55,3,1,1 BRF:6 -BRH:0 +BRH:6 end_of_record TN: SF:TSinjex/src/functions/register.ts FN:33,register FNF:1 -FNH:0 -FNDA:0,register -DA:2,0 -DA:33,0 -DA:38,0 +FNH:1 +FNDA:1,register +DA:2,1 +DA:33,1 +DA:38,1 LF:3 -LH:0 +LH:3 BRF:0 BRH:0 end_of_record @@ -221,28 +164,13 @@ TN: SF:TSinjex/src/functions/resolve.ts FN:35,resolve FNF:1 -FNH:0 -FNDA:0,resolve -DA:2,0 -DA:35,0 -DA:39,0 +FNH:1 +FNDA:1,resolve +DA:2,1 +DA:35,1 +DA:39,1 LF:3 -LH:0 -BRF:0 -BRH:0 -end_of_record -TN: -SF:TSinjex/src/helper/ImplementsStatic.ts -FN:6,ImplementsStatic -FN:7,(anonymous_1) -FNF:2 -FNH:2 -FNDA:1,ImplementsStatic -FNDA:1,(anonymous_1) -DA:6,1 -DA:7,1 -LF:2 -LH:2 +LH:3 BRF:0 BRH:0 end_of_record @@ -252,14 +180,14 @@ FN:11,(anonymous_0) FN:26,(anonymous_1) FNF:2 FNH:2 -FNDA:1,(anonymous_0) -FNDA:1,(anonymous_1) -DA:6,1 -DA:12,1 -DA:13,1 -DA:21,1 -DA:27,1 -DA:28,1 +FNDA:2,(anonymous_0) +FNDA:2,(anonymous_1) +DA:6,3 +DA:12,2 +DA:13,2 +DA:21,3 +DA:27,2 +DA:28,2 LF:6 LH:6 BRF:0 diff --git a/functions/decorators_Inject.Inject.html b/functions/decorators_Inject.Inject.html index 667f64d..bba67f5 100644 --- a/functions/decorators_Inject.Inject.html +++ b/functions/decorators_Inject.Inject.html @@ -17,4 +17,4 @@ and not found, or throws an error if the dependency is necessary and not found.<
    class MyClass {
    @Inject('ILogger_', (x: ILogger_) => x.getLogger('Tags'), false)
    private _logger?: ILogger;
    }
    -
    +
    diff --git a/functions/decorators_Register.Register.html b/functions/decorators_Register.Register.html index a0c8ebd..fff782c 100644 --- a/functions/decorators_Register.Register.html +++ b/functions/decorators_Register.Register.html @@ -8,4 +8,4 @@ is logged only once upon the first resolution of the dependency.

    @Register('MyClassIdentifier')
    class MyClass {
    // ...
    }
    -
    +
    diff --git a/functions/decorators_RegisterInstance.RegisterInstance.html b/functions/decorators_RegisterInstance.RegisterInstance.html index 011ae16..7ba9787 100644 --- a/functions/decorators_RegisterInstance.RegisterInstance.html +++ b/functions/decorators_RegisterInstance.RegisterInstance.html @@ -11,4 +11,4 @@ as input and returns an instance of the class.

    @RegisterInstance('MyClassInstanceIdentifier', (constructor) => new constructor())
    class MyClass {
    // ...
    }
    -
    +
    diff --git a/functions/functions_register.register.html b/functions/functions_register.register.html index 5e9d8a6..6fc544c 100644 --- a/functions/functions_register.register.html +++ b/functions/functions_register.register.html @@ -8,9 +8,9 @@ is logged when the dependency is resolved.

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier used to register the class in the DI container.

    • dependency: T

      The dependency to register.

    Returns void

    Identifier for more information on identifiers..

    -
  • Register a dependency.

    +
  • Register a dependency.

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier used to register the class in the DI container.

    • dependency: T

      The dependency to register.

    • Optionaldeprecated: true

      A warning is logged when the dependency is resolved.

    Returns void

    Identifier for more information on identifiers.

    -
  • +
    diff --git a/functions/functions_resolve.resolve.html b/functions/functions_resolve.resolve.html index ffcb2e3..db221be 100644 --- a/functions/functions_resolve.resolve.html +++ b/functions/functions_resolve.resolve.html @@ -10,9 +10,9 @@ and not found, or throws an error if the dependency is necessary and not found.<

    Returns T

    The resolved dependency.

    Identifier for more information on identifiers.

    A DependencyResolutionError if the dependency is not found.

    -
  • Resolve a dependency

    +
  • Resolve a dependency

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier used to register the class in the DI container.

    • necessary: false

      The dependency is not necessary.

    Returns T | undefined

    The resolved dependency or undefined if the dependency is not found.

    Identifier for more information on identifiers.

    -
  • +
    diff --git a/functions/helper_ImplementsStatic.ImplementsStatic.html b/functions/helper_ImplementsStatic.ImplementsStatic.html index eabd525..632f359 100644 --- a/functions/helper_ImplementsStatic.ImplementsStatic.html +++ b/functions/helper_ImplementsStatic.ImplementsStatic.html @@ -1,4 +1,4 @@ ImplementsStatic | ts-injex - v0.0.11
    • Decorator to enforce static implementation of an interface. Warns on compile time if the interface is not implemented.

      Type Parameters

      • I

      Returns (<T>(constructor: T, ...args: unknown[]) => void)

      A decorator function

      -
        • <T>(constructor, ...args): void
        • Type Parameters

          • T

          Parameters

          • constructor: T
          • Rest...args: unknown[]

          Returns void

    +
      • <T>(constructor, ...args): void
      • Type Parameters

        • T

        Parameters

        • constructor: T
        • Rest...args: unknown[]

        Returns void

    diff --git a/interfaces/interfaces_IDependency.IDependency.html b/interfaces/interfaces_IDependency.IDependency.html index d151b46..2e8cfbc 100644 --- a/interfaces/interfaces_IDependency.IDependency.html +++ b/interfaces/interfaces_IDependency.IDependency.html @@ -1,7 +1,7 @@ IDependency | ts-injex - v0.0.11

    Dependency Entry Interface

    -
    interface IDependency {
        dependency: unknown;
        deprecated?: boolean;
    }

    Properties

    interface IDependency {
        dependency: unknown;
        deprecated?: boolean;
    }

    Properties

    dependency: unknown

    The dependency itself

    -
    deprecated?: boolean

    If true, the dependency is deprecated => a warning +

    deprecated?: boolean

    If true, the dependency is deprecated => a warning is logged when the dependency is resolved

    -
    +
    diff --git a/interfaces/interfaces_ITSinjex.ITSinjex.html b/interfaces/interfaces_ITSinjex.ITSinjex.html index fa7450e..f58df09 100644 --- a/interfaces/interfaces_ITSinjex.ITSinjex.html +++ b/interfaces/interfaces_ITSinjex.ITSinjex.html @@ -1,31 +1,31 @@ ITSinjex | ts-injex - v0.0.11

    Instance TSinjex Interface

    -
    interface ITSinjex {
        register<T>(identifier: string, dependency: T, deprecated?: boolean): void;
        register<T>(identifier: string, dependency: T, deprecated?: true): void;
        register<T>(identifier: string, dependency: T, deprecated?: false): void;
        resolve<T>(identifier: string, necessary?: boolean): undefined | T;
        resolve<T>(identifier: string, necessary?: true): T;
        resolve<T>(identifier: string, necessary?: false): undefined | T;
    }

    Hierarchy (view full)

    Implemented by

    Methods

    interface ITSinjex {
        register<T>(identifier: string, dependency: T, deprecated?: boolean): void;
        register<T>(identifier: string, dependency: T, deprecated?: true): void;
        register<T>(identifier: string, dependency: T, deprecated?: false): void;
        resolve<T>(identifier: string, necessary?: boolean): undefined | T;
        resolve<T>(identifier: string, necessary?: true): T;
        resolve<T>(identifier: string, necessary?: false): undefined | T;
    }

    Hierarchy (view full)

    Implemented by

    Methods

    • Register a dependency.

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

      • dependency: T

        The dependency to register.

      • Optionaldeprecated: boolean

        If true, the dependency is deprecated => a warning is logged when the dependency is resolved.

        -

      Returns void

    • Register a deprecated dependency.

      +

    Returns void

  • Register a deprecated dependency.

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

    • dependency: T

      The dependency to register.

    • Optionaldeprecated: true

      A warning is logged when the dependency is resolved.

      -

    Returns void

  • Register a dependency.

    +
  • Returns void

  • Register a dependency.

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

    • dependency: T

      The dependency to register.

    • Optionaldeprecated: false

      No warning is logged when the dependency is resolved.

      -

    Returns void

    • Resolve a dependency

      +

    Returns void

    • Resolve a dependency

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency

      • Optionalnecessary: boolean

        If true, throws an error if the dependency is not found

      Returns undefined | T

      The resolved dependency or undefined if the dependency is not found

      A DependencyResolutionError if the dependency is not found and necessary.

      -
    • Resolve a necessary dependency.

      +
    • Resolve a necessary dependency.

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

      • Optionalnecessary: true

        If true, throws an error if the dependency is not found.

      Returns T

      The resolved dependency.

      A DependencyResolutionError if the dependency is not found.

      -
    • Resolve a non necessary dependency

      +
    • Resolve a non necessary dependency

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency

      • Optionalnecessary: false

        Not necessary, does not throw an error if the dependency is not found.

      Returns undefined | T

      The resolved dependency or undefined if the dependency is not found

      -
    +
    diff --git a/interfaces/interfaces_ITSinjex.ITSinjexRegister.html b/interfaces/interfaces_ITSinjex.ITSinjexRegister.html index aa21305..06ade47 100644 --- a/interfaces/interfaces_ITSinjex.ITSinjexRegister.html +++ b/interfaces/interfaces_ITSinjex.ITSinjexRegister.html @@ -1,16 +1,16 @@ ITSinjexRegister | ts-injex - v0.0.11

    Register method for static and instance Dependency Injection Container.

    -
    interface ITSinjexRegister {
        register<T>(identifier: string, dependency: T, deprecated?: boolean): void;
        register<T>(identifier: string, dependency: T, deprecated?: true): void;
        register<T>(identifier: string, dependency: T, deprecated?: false): void;
    }

    Hierarchy (view full)

    Methods

    interface ITSinjexRegister {
        register<T>(identifier: string, dependency: T, deprecated?: boolean): void;
        register<T>(identifier: string, dependency: T, deprecated?: true): void;
        register<T>(identifier: string, dependency: T, deprecated?: false): void;
    }

    Hierarchy (view full)

    Methods

    Methods

    • Register a dependency.

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

      • dependency: T

        The dependency to register.

      • Optionaldeprecated: boolean

        If true, the dependency is deprecated => a warning is logged when the dependency is resolved.

        -

      Returns void

    • Register a deprecated dependency.

      +

    Returns void

  • Register a deprecated dependency.

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

    • dependency: T

      The dependency to register.

    • Optionaldeprecated: true

      A warning is logged when the dependency is resolved.

      -

    Returns void

  • Register a dependency.

    +
  • Returns void

  • Register a dependency.

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

    • dependency: T

      The dependency to register.

    • Optionaldeprecated: false

      No warning is logged when the dependency is resolved.

      -

    Returns void

  • +

    Returns void

    diff --git a/interfaces/interfaces_ITSinjex.ITSinjexResolve.html b/interfaces/interfaces_ITSinjex.ITSinjexResolve.html index dfde747..f0bac8f 100644 --- a/interfaces/interfaces_ITSinjex.ITSinjexResolve.html +++ b/interfaces/interfaces_ITSinjex.ITSinjexResolve.html @@ -1,17 +1,17 @@ ITSinjexResolve | ts-injex - v0.0.11

    Resolve method for static and instance Dependency Injection Container.

    -
    interface ITSinjexResolve {
        resolve<T>(identifier: string, necessary?: boolean): undefined | T;
        resolve<T>(identifier: string, necessary?: true): T;
        resolve<T>(identifier: string, necessary?: false): undefined | T;
    }

    Hierarchy (view full)

    Methods

    interface ITSinjexResolve {
        resolve<T>(identifier: string, necessary?: boolean): undefined | T;
        resolve<T>(identifier: string, necessary?: true): T;
        resolve<T>(identifier: string, necessary?: false): undefined | T;
    }

    Hierarchy (view full)

    Methods

    Methods

    • Resolve a dependency

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency

      • Optionalnecessary: boolean

        If true, throws an error if the dependency is not found

      Returns undefined | T

      The resolved dependency or undefined if the dependency is not found

      A DependencyResolutionError if the dependency is not found and necessary.

      -
    • Resolve a necessary dependency.

      +
    • Resolve a necessary dependency.

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

      • Optionalnecessary: true

        If true, throws an error if the dependency is not found.

      Returns T

      The resolved dependency.

      A DependencyResolutionError if the dependency is not found.

      -
    • Resolve a non necessary dependency

      +
    • Resolve a non necessary dependency

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency

      • Optionalnecessary: false

        Not necessary, does not throw an error if the dependency is not found.

      Returns undefined | T

      The resolved dependency or undefined if the dependency is not found

      -
    +
    diff --git a/interfaces/interfaces_ITSinjex.ITSinjex_.html b/interfaces/interfaces_ITSinjex.ITSinjex_.html index aa59a5d..b410275 100644 --- a/interfaces/interfaces_ITSinjex.ITSinjex_.html +++ b/interfaces/interfaces_ITSinjex.ITSinjex_.html @@ -1,34 +1,34 @@ ITSinjex_ | ts-injex - v0.0.11

    Static TSInjex Interface

    -
    interface ITSinjex_ {
        getInstance(): ITSinjex;
        register<T>(identifier: string, dependency: T, deprecated?: boolean): void;
        register<T>(identifier: string, dependency: T, deprecated?: true): void;
        register<T>(identifier: string, dependency: T, deprecated?: false): void;
        resolve<T>(identifier: string, necessary?: boolean): undefined | T;
        resolve<T>(identifier: string, necessary?: true): T;
        resolve<T>(identifier: string, necessary?: false): undefined | T;
    }

    Hierarchy (view full)

    Methods

    interface ITSinjex_ {
        getInstance(): ITSinjex;
        register<T>(identifier: string, dependency: T, deprecated?: boolean): void;
        register<T>(identifier: string, dependency: T, deprecated?: true): void;
        register<T>(identifier: string, dependency: T, deprecated?: false): void;
        resolve<T>(identifier: string, necessary?: boolean): undefined | T;
        resolve<T>(identifier: string, necessary?: true): T;
        resolve<T>(identifier: string, necessary?: false): undefined | T;
    }

    Hierarchy (view full)

    Methods

    • Register a dependency.

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

      • dependency: T

        The dependency to register.

      • Optionaldeprecated: boolean

        If true, the dependency is deprecated => a warning is logged when the dependency is resolved.

        -

      Returns void

    • Register a deprecated dependency.

      +

    Returns void

  • Register a deprecated dependency.

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

    • dependency: T

      The dependency to register.

    • Optionaldeprecated: true

      A warning is logged when the dependency is resolved.

      -

    Returns void

  • Register a dependency.

    +
  • Returns void

  • Register a dependency.

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

    • dependency: T

      The dependency to register.

    • Optionaldeprecated: false

      No warning is logged when the dependency is resolved.

      -

    Returns void

    • Resolve a dependency

      +

    Returns void

    • Resolve a dependency

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency

      • Optionalnecessary: boolean

        If true, throws an error if the dependency is not found

      Returns undefined | T

      The resolved dependency or undefined if the dependency is not found

      A DependencyResolutionError if the dependency is not found and necessary.

      -
    • Resolve a necessary dependency.

      +
    • Resolve a necessary dependency.

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

      • Optionalnecessary: true

        If true, throws an error if the dependency is not found.

      Returns T

      The resolved dependency.

      A DependencyResolutionError if the dependency is not found.

      -
    • Resolve a non necessary dependency

      +
    • Resolve a non necessary dependency

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency

      • Optionalnecessary: false

        Not necessary, does not throw an error if the dependency is not found.

      Returns undefined | T

      The resolved dependency or undefined if the dependency is not found

      -
    +
    diff --git a/modules/classes_TSinjex.html b/modules/classes_TSinjex.html index 0ea3792..eeba92e 100644 --- a/modules/classes_TSinjex.html +++ b/modules/classes_TSinjex.html @@ -1,2 +1,2 @@ -classes/TSinjex | ts-injex - v0.0.11

    Module classes/TSinjex

    Index

    Classes

    TSinjex +classes/TSinjex | ts-injex - v0.0.11

    Module classes/TSinjex

    Index

    Classes

    diff --git a/modules/decorators_Inject.html b/modules/decorators_Inject.html index 83e4ef0..3dcd793 100644 --- a/modules/decorators_Inject.html +++ b/modules/decorators_Inject.html @@ -1,2 +1,2 @@ -decorators/Inject | ts-injex - v0.0.11

    Module decorators/Inject

    Index

    Functions

    Inject +decorators/Inject | ts-injex - v0.0.11

    Module decorators/Inject

    Index

    Functions

    diff --git a/modules/decorators_Register.html b/modules/decorators_Register.html index cd74739..b99a327 100644 --- a/modules/decorators_Register.html +++ b/modules/decorators_Register.html @@ -1,2 +1,2 @@ -decorators/Register | ts-injex - v0.0.11

    Module decorators/Register

    Index

    Functions

    Register +decorators/Register | ts-injex - v0.0.11

    Module decorators/Register

    Index

    Functions

    diff --git a/modules/decorators_RegisterInstance.html b/modules/decorators_RegisterInstance.html index a2dea1f..84bd925 100644 --- a/modules/decorators_RegisterInstance.html +++ b/modules/decorators_RegisterInstance.html @@ -1,2 +1,2 @@ -decorators/RegisterInstance | ts-injex - v0.0.11

    Module decorators/RegisterInstance

    Index

    Functions

    RegisterInstance +decorators/RegisterInstance | ts-injex - v0.0.11

    Module decorators/RegisterInstance

    Index

    Functions

    diff --git a/modules/functions_register.html b/modules/functions_register.html index 59e5d74..23936c1 100644 --- a/modules/functions_register.html +++ b/modules/functions_register.html @@ -1,2 +1,2 @@ -functions/register | ts-injex - v0.0.11

    Module functions/register

    Index

    Functions

    register +functions/register | ts-injex - v0.0.11

    Module functions/register

    Index

    Functions

    diff --git a/modules/functions_resolve.html b/modules/functions_resolve.html index 6b24dfa..28183f6 100644 --- a/modules/functions_resolve.html +++ b/modules/functions_resolve.html @@ -1,2 +1,2 @@ -functions/resolve | ts-injex - v0.0.11

    Module functions/resolve

    Index

    Functions

    resolve +functions/resolve | ts-injex - v0.0.11

    Module functions/resolve

    Index

    Functions

    diff --git a/modules/helper_ImplementsStatic.html b/modules/helper_ImplementsStatic.html index b86b0a9..f0a2652 100644 --- a/modules/helper_ImplementsStatic.html +++ b/modules/helper_ImplementsStatic.html @@ -1,2 +1,2 @@ -helper/ImplementsStatic | ts-injex - v0.0.11

    Module helper/ImplementsStatic

    Index

    Functions

    ImplementsStatic +helper/ImplementsStatic | ts-injex - v0.0.11

    Module helper/ImplementsStatic

    Index

    Functions

    diff --git a/modules/index.html b/modules/index.html index 25a067e..6c5ef48 100644 --- a/modules/index.html +++ b/modules/index.html @@ -1,4 +1,4 @@ -index | ts-injex - v0.0.11

    Module index

    References

    ForceConstructor +index | ts-injex - v0.0.11

    Module index

    References

    ForceConstructor GenericConstructor ITSinjex ITSinjexRegister diff --git a/modules/interfaces_Exceptions.html b/modules/interfaces_Exceptions.html index c3a9063..16db26c 100644 --- a/modules/interfaces_Exceptions.html +++ b/modules/interfaces_Exceptions.html @@ -1,3 +1,3 @@ -interfaces/Exceptions | ts-injex - v0.0.11

    Module interfaces/Exceptions

    Index

    Classes

    DependencyResolutionError +interfaces/Exceptions | ts-injex - v0.0.11
    diff --git a/modules/interfaces_IDependency.html b/modules/interfaces_IDependency.html index d3b032f..151f69a 100644 --- a/modules/interfaces_IDependency.html +++ b/modules/interfaces_IDependency.html @@ -1,2 +1,2 @@ -interfaces/IDependency | ts-injex - v0.0.11

    Module interfaces/IDependency

    Index

    Interfaces

    IDependency +interfaces/IDependency | ts-injex - v0.0.11

    Module interfaces/IDependency

    Index

    Interfaces

    diff --git a/modules/interfaces_ITSinjex.html b/modules/interfaces_ITSinjex.html index 6948e58..bbf0e60 100644 --- a/modules/interfaces_ITSinjex.html +++ b/modules/interfaces_ITSinjex.html @@ -1,4 +1,4 @@ -interfaces/ITSinjex | ts-injex - v0.0.11

    Module interfaces/ITSinjex

    Index

    Interfaces

    ITSinjex +interfaces/ITSinjex | ts-injex - v0.0.11

    Module interfaces/ITSinjex

    Index

    Interfaces

    ITSinjex ITSinjexRegister ITSinjexResolve ITSinjex_ diff --git a/modules/types_GenericContructor.html b/modules/types_GenericContructor.html index 1fabebd..c033a76 100644 --- a/modules/types_GenericContructor.html +++ b/modules/types_GenericContructor.html @@ -1,3 +1,3 @@ -types/GenericContructor | ts-injex - v0.0.11

    Module types/GenericContructor

    Index

    Type Aliases

    ForceConstructor +types/GenericContructor | ts-injex - v0.0.11
    diff --git a/modules/types_Identifier.html b/modules/types_Identifier.html index 1141e6a..a9fcd99 100644 --- a/modules/types_Identifier.html +++ b/modules/types_Identifier.html @@ -1,2 +1,2 @@ -types/Identifier | ts-injex - v0.0.11

    Module types/Identifier

    Index

    Type Aliases

    Identifier +types/Identifier | ts-injex - v0.0.11

    Module types/Identifier

    Index

    Type Aliases

    diff --git a/modules/types_InitDelegate.html b/modules/types_InitDelegate.html index 861a26f..778c162 100644 --- a/modules/types_InitDelegate.html +++ b/modules/types_InitDelegate.html @@ -1,2 +1,2 @@ -types/InitDelegate | ts-injex - v0.0.11

    Module types/InitDelegate

    Index

    Type Aliases

    InitDelegate +types/InitDelegate | ts-injex - v0.0.11

    Module types/InitDelegate

    Index

    Type Aliases

    diff --git a/types/types_GenericContructor.ForceConstructor.html b/types/types_GenericContructor.ForceConstructor.html index 824f167..aa4878b 100644 --- a/types/types_GenericContructor.ForceConstructor.html +++ b/types/types_GenericContructor.ForceConstructor.html @@ -1,3 +1,3 @@ ForceConstructor | ts-injex - v0.0.11
    ForceConstructor<T>: (new (...args: unknown[]) => T)

    Force generic constructor type. This type is used to force a class to has a constructor.

    -

    Type Parameters

    • T
    +

    Type Parameters

    • T
    diff --git a/types/types_GenericContructor.GenericConstructor.html b/types/types_GenericContructor.GenericConstructor.html index 76cf686..a86d093 100644 --- a/types/types_GenericContructor.GenericConstructor.html +++ b/types/types_GenericContructor.GenericConstructor.html @@ -1,3 +1,3 @@ GenericConstructor | ts-injex - v0.0.11
    GenericConstructor<T>: (new (...args: ConstructorParameters<T>) => T)

    Generic constructor type. This type is used to define a constructor of a class.

    -

    Type Parameters

    • T extends (abstract new (...args: unknown[]) => InstanceType<T>)
    +

    Type Parameters

    • T extends (abstract new (...args: unknown[]) => InstanceType<T>)
    diff --git a/types/types_Identifier.Identifier.html b/types/types_Identifier.Identifier.html index 3692512..0419292 100644 --- a/types/types_Identifier.Identifier.html +++ b/types/types_Identifier.Identifier.html @@ -6,4 +6,4 @@ The convection for naming is as follows: The name should generally correspond to the interface that is relevant. I.e. a class ClassA that implements the interface IClassA and is registered as a dependent class is registered under the interface name IClassA.

    -
    +
    diff --git a/types/types_InitDelegate.InitDelegate.html b/types/types_InitDelegate.InitDelegate.html index 4a5132b..d9c4cce 100644 --- a/types/types_InitDelegate.InitDelegate.html +++ b/types/types_InitDelegate.InitDelegate.html @@ -4,4 +4,4 @@ into an output of type U.

  • U

    The type of the output parameter.

  • Type declaration

      • (x): U
      • Parameters

        • x: T

          The input parameter of type T.

        Returns U

        The transformed output of type U.

        -
    +