diff --git a/assets/navigation.js b/assets/navigation.js index 2676a06..ae58075 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA5WWy07DMBBF/8Xripd4dstL3QI7hKLInVJDakf2FBUh/h2TNoljz0SOukvunHudscd9/REIOxRzIavSOXDHL89Kf8BOzERd4tq/2JjltvIvDoLiIDha46byqk+ll2J+NhNyraqlBS3mrx00gbUuMYyEnp5d/779zjraEqSxJRrrBG238AyJafS+sNhLssLHtNVWS1RGUzwKe3k+SP8E78oh2NF4rSgrYEokI3ZMGs7EXGiHpZaQFbcVT4qdOozG7zzGTZvlhAvqoMymsWxfusrCTmlLCuzXRSBpdtQVC85UX0QzQmAjyYwY4eiEeyAJTj7zGqoa7PFiU1ewAY3uGUtUMk28FxaxMO9IsvR+ARx/3DD63v4ZNQObx1HSQZXv46qUwO21+52Eut2MCbstLnpZ1le5gxp8MC2/n/5btf2vvLfWBDuwnbu0CQtI5/Esnu2TjMKa8Vm/6DONfqpAl7eDKG7P49C8zcXlMDd7f4bkKXdoSmTitlCG7oOmMdMrJBPOXFSMSTRtsj2oiUZaFJPhBdXHsJP4XbPn+BE0WCVvjUa7lWiIy6MpLxJhVssfjJXga1xCb6gsO66LzE5urk4vwnnVE6Y6pZW01+Bo+OODaqWoq3bv0yvyTgYBDGMHOJZM5dQK76CC9xKJC/eADjSZfyYp6CBtiBzhd4n97w9lCdBXvwsAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA5WWQW/cIBCF/wvnVdNESdrutUmjPbSHpLeoshCejWlYsICtNq3y34vttY1hQFh787753rMHBp7/EQsnS7aECWoMmIufT1z+hhPZkJbaxv1xUPVRuD/Oguos+NDYg3CqVy5rsr3aENZwUWuQZPs8QSPY6BLCUOjl1ef3X++biVYDU5papQ3B7XaOwWwcfS6sBklR+JC2P0pmuZIYD8PeXi/SP8ILNxZ0Nt4oKgoYE9GIExOHJ2LupLFUMiiKO4pXxY4dsvEnj7xp/zr+C03QxKLRyb5MlZVe05YYOL8XgsTZQVc0GCX+IM3wgb2kMGKAwxMOQBQcfeYGRAv6YndoBRxAWvNkqeUsTjwIq1BYtiWT9PkFUvy8YfC93TNsBvaPg6SLKtfHPWWQWmv3JwbtuBgj9lhczbKir3IHLbhgkr09dq06dpX3WitvBY5zFzdJAuJ5vPHGI7ecCv6XrvZDSvNO3XBVeqWHV5Sj/1DDIHGJusrvYBtVr7JKE3K+5yNvlZNfkz8rd3NPs0vN05XtQIw781LotM3N7TJ38v7hk9fcQWJiIu4ITdBd0DhmfAQXwhMHfcIkmNbFHtiJgFpUq+EV1ke/k/atTc7BB5CgOfuqpNXHbpfG7e7Lq0hY1PJvSjNwNSai99QkO6wLzD5++XR548/7mbDWKa7EvRZbw20fy/ccu6oMPrOibGcgQD+2h0uSsZxuut+BgBdqkQvLGe1pCi/jGHSR1kdm+FNi9/sPrrytkP8MAAA=" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js index 190b448..50de676 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA82bTXPiRhCG/wu+spj5BHxNNilfd1O5uFyUC7S7SjBQQt4k5fJ/z4w0krrVPWIETm1OGJh+u6fnmZ4P5NdJcfjrNLl7eJ38me+3kzs5neyfnrPJ3cS9zf6eTCcvxc69ez5sX3bZ6bb6dPatfN65rza7p9Mpc+aTyduUKoSvb3/7nO//YLTC9+vw/aCqkMtWt6/X+OnrxXWnk+NTke1LJkjgci5163Od70/l036TjfJ6A806/+Vp+yE/fTgW+fenMhuIZkajknPdZeJrVt5fFBc2TMrMuViK7Gt+KrNiXCCN1Qf5fnGcDrvvI/MRjK6KwgiA/sFlt3jZlIeR+cCG74MMBnmbHTM3ifeb3AmPg7ln+h8AfR1E/weEromhDWCbbQ7Fk2PgdHvvGm1KUju7Fuu6xWD1tN349/S+vOw3Ze6gYxSjwqBX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l0OouQw5BLlaYLHonOwy19p74CUY6W6y6eQbclUNSXKnKDI8DoiDRc4JNinVD3tJcb5tQQG6GifbIvq5+DBLpgyNU8Vbd9TgwIGSBkkoS++GvNCEEKJM6IWmCRFh/38DsYERCnHC8Y7s+BngV6Mknva32LHOs5gFGHWWNXicIlByFAR4dZmFZvwlPSefsM9Ck8PA66D6a6TOMyBz/1gm6DcTHJQuxUgRUxrSQO9hCUaZkGdvjP3U5j3kmkIZfv83Lb/rYBsgTSbcKyZNMGk9ZRAcISzZqWRhp4NiYDT7wDbVCkZVrhgw/zREYWTA2VNtegKLPgSTB7lU1TZGQUyKQ2YVgSex3k1igsMMwqrKA2cVIEPa72SYCyDkXVJiLdypIKKMFQ67CFsmm55IKEdaA2C0VQhLcyRK7C5zqgq5v5ELZpNm3uDy7foHSKZZBN23IwiQKsNTvMEKoMadPhvQ51WjdjnwY7BziYhmGGp5WLoEU3DAB1mShVPSbSrXrcoge2IXqMamQxAeNm0jAIcrG6C8bOJMwYd/o45sdsl++dycPj29u/CCyuA+hBAAA="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA82cS3PjNhLHv4t81cjCk5KveZUP2cNkay8ul0olcWaYyJKLomeTdfm7L0iCRLe6QYGSU85JJon+d6Pxw4Mg6ddJefjvcXL38Dr5o9hvJ3dyOtmvn/LJ3cQd5n9OppOXcueOng7bl11+vG3Ozr5VTzt3abNbH4+5M59M3qZUwV++/fdvxf53RstfX/nrg6pCLnrdU73Oz6leXHc6eV6X+b5iggQu51L3PlfF/lit95t8lNcbaBb8V8ftp+L46bksvq+rfCCaGY1KznXIxNe8ur8oLmyYlJlzsZT51+JY5eW4QDqrT/L94jgedt9H5sMbXRWFEQD9g8tu+bKpDiPzgQ3fBxkM8jZ/zl0n3m8KJzwO5hPTvwHo6yD6JyB0TQx9ANt8cyjXjoHj7b0rtKnI2BlKrNoSg6OnDe1/ovflZb+pCgcdoxgVBrWikQKvxigbwFtVfz3nYx3f+L9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8MhsdgjLKlz/VbDd9z8sq3963204PD/1Dh9f6e8zmpOtrfvPrdeLulO9e36YTd+/Z/i7bX+mPTfe7aH9tU/4t7FU1Z/vtqvpaHdnJZ2/B9yK4XqQpha9Bg4oKKmnxdO/xVUe/JQqyAZKRpgX3/4JOFnQyn0OfSyX8r8+1W2a3v1mSP/CtSeEflASvSxB9WvhALuz9g3RIoKgvVeQaTYBWE6lVDy/rBSEJUu2W4OOEyv6V6bx98RToAhRUsm7/qh4QApTrtFb5Uu8sR8gKTxBfJ8azldk0WearItAiJgjLtAozn/MAPRColEl6X9uN/FjNQYDG95rMJApXHIQatExrqdMg95+fFP3HJUf/VQ6oPuBSpqkW4Gk7qDbgx6a1SxHpKqBF1DJNaaiGIDCZ1g7+XyIEjXmQSKzavqi2/eMl0JRAyUoPR2La0VvWdCAAlKi0jkZHZgHCEz48m5qz9jMFGhgYnFVaBwMvT+XgQycQJ5hCZNqwDN/2inAHOq5Km+ihKDNNSxCmTqw6I6PAJGT8vJylrSE6uRXSA62s/fyeJXLt9biRWYGpSHdDftpMEmTJ+KwAPtovTrK0XO4PBfzI46n5yIPyCRdmaV2Rqz0c9VszH6zwh9K3nPbH2q9OTdfP/KrVpg15g6sWMBaIbhGc1k2YFgDDcbfgnvsqeXh0t+D2540/b9N6EddzQP/2WmlN47VoKwPmZWJYzQtKYbLn5nqQaJMYYKMamUPBZGzSMPBykelGgQHIJnRFdzP2XDznu2LvTB4e397+DzP+Jgs4SAAA"; \ No newline at end of file diff --git a/classes/classes_TSinjex.TSinjex.html b/classes/classes_TSinjex.TSinjex.html index b8f6c76..8575a0e 100644 --- a/classes/classes_TSinjex.TSinjex.html +++ b/classes/classes_TSinjex.TSinjex.html @@ -1,4 +1,4 @@ -TSinjex | ts-injex - v0.0.13

TSinjex

The main class for the Dependency Injection Container TSinjex.

+TSinjex | ts-injex - v0.1.0

TSinjex

The main class for the Dependency Injection Container TSinjex.

  • Register for registering a class in the DI container.
  • RegisterInstance for registering an instance in the DI container.
  • @@ -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

  • Register a dependency.

    -

    Type Parameters

    • T

    Parameters

Properties

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

The dependencies map.

+
_instance: TSinjex

The singleton instance of the TSinjex class.

+

Methods

  • Register a dependency.

    +

    Type Parameters

    • T

    Parameters

    • identifier: Identifier

      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

    -

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency

      +

    Returns void

  • Resolve a dependency

    +

    Type Parameters

    • T

    Parameters

    • identifier: Identifier

      The identifier of the dependency

    • necessary: boolean = true

      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.

    -
+
diff --git a/classes/interfaces_Exceptions.DependencyResolutionError.html b/classes/interfaces_Exceptions.DependencyResolutionError.html index a416be8..293c370 100644 --- a/classes/interfaces_Exceptions.DependencyResolutionError.html +++ b/classes/interfaces_Exceptions.DependencyResolutionError.html @@ -1,6 +1,6 @@ -DependencyResolutionError | ts-injex - v0.0.13

Error class for dependency resolution errors in ITSinjex.

+DependencyResolutionError | ts-injex - v0.1.0

Error class for dependency resolution errors in ITSinjex.

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

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

Optional override for formatting stack traces

+

Parameters

  • identifier: Identifier

    The identifier of the dependency

    +

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

+

Parameters

  • targetObject: object
  • OptionalconstructorOpt: Function

Returns void

diff --git a/classes/interfaces_Exceptions.InitializationError.html b/classes/interfaces_Exceptions.InitializationError.html new file mode 100644 index 0000000..eb889b6 --- /dev/null +++ b/classes/interfaces_Exceptions.InitializationError.html @@ -0,0 +1,16 @@ +InitializationError | ts-injex - v0.1.0

Error class for errors during the initialization of a dependency in ITSinjex.

+

ITSinjex.inject

+

Hierarchy (view full)

Constructors

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.InjectorError.html b/classes/interfaces_Exceptions.InjectorError.html new file mode 100644 index 0000000..252735a --- /dev/null +++ b/classes/interfaces_Exceptions.InjectorError.html @@ -0,0 +1,16 @@ +InjectorError | ts-injex - v0.1.0

Error class for Injector errors in ITSinjex.

+

ITSinjex.inject

+

Hierarchy (view full)

Constructors

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.NoInstantiationMethodError.html b/classes/interfaces_Exceptions.NoInstantiationMethodError.html new file mode 100644 index 0000000..e3425c4 --- /dev/null +++ b/classes/interfaces_Exceptions.NoInstantiationMethodError.html @@ -0,0 +1,15 @@ +NoInstantiationMethodError | ts-injex - v0.1.0

Error class for missing instantiation methods in ITSinjex.

+

ITSinjex.inject

+

Hierarchy (view full)

Constructors

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 7017ad4..7125719 100644 --- a/classes/interfaces_Exceptions.TSinjexError.html +++ b/classes/interfaces_Exceptions.TSinjexError.html @@ -1,5 +1,5 @@ -TSinjexError | ts-injex - v0.0.13

General error class for ITSinjex interface.

-

Hierarchy (view full)

Constructors

constructor +TSinjexError | ts-injex - v0.1.0

General error class for ITSinjex interface.

+

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

+

Parameters

Returns void

diff --git a/coverage/badges/badge-branches.svg b/coverage/badges/badge-branches.svg index 01d2405..4aa8528 100644 --- a/coverage/badges/badge-branches.svg +++ b/coverage/badges/badge-branches.svg @@ -1 +1 @@ -branches: 100%branches100% \ No newline at end of file +branches: 91.66%branches91.66% \ No newline at end of file diff --git a/coverage/badges/badge-functions.svg b/coverage/badges/badge-functions.svg index b53473b..820762a 100644 --- a/coverage/badges/badge-functions.svg +++ b/coverage/badges/badge-functions.svg @@ -1 +1 @@ -functions: 100%functions100% \ No newline at end of file +functions: 96.42%functions96.42% \ No newline at end of file diff --git a/coverage/badges/badge-lines.svg b/coverage/badges/badge-lines.svg index 9c6d26b..4a9991c 100644 --- a/coverage/badges/badge-lines.svg +++ b/coverage/badges/badge-lines.svg @@ -1 +1 @@ -lines: 100%lines100% \ No newline at end of file +lines: 96.73%lines96.73% \ No newline at end of file diff --git a/coverage/badges/badge-statements.svg b/coverage/badges/badge-statements.svg index a7d1308..eb4b8f5 100644 --- a/coverage/badges/badge-statements.svg +++ b/coverage/badges/badge-statements.svg @@ -1 +1 @@ -statements: 100%statements100% \ No newline at end of file +statements: 96.84%statements96.84% \ No newline at end of file diff --git a/coverage/coverage-summary.json b/coverage/coverage-summary.json index d563844..46c276b 100644 --- a/coverage/coverage-summary.json +++ b/coverage/coverage-summary.json @@ -1,9 +1,9 @@ -{"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}} +{"total": {"lines":{"total":92,"covered":89,"skipped":0,"pct":96.73},"statements":{"total":95,"covered":92,"skipped":0,"pct":96.84},"functions":{"total":28,"covered":27,"skipped":0,"pct":96.42},"branches":{"total":48,"covered":44,"skipped":0,"pct":91.66},"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/Inject.ts": {"lines":{"total":29,"covered":28,"skipped":0,"pct":96.55},"functions":{"total":9,"covered":9,"skipped":0,"pct":100},"statements":{"total":30,"covered":29,"skipped":0,"pct":96.66},"branches":{"total":31,"covered":27,"skipped":0,"pct":87.09}} ,"/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}} +,"/home/runner/work/TSinjex/TSinjex/src/interfaces/Exceptions.ts": {"lines":{"total":15,"covered":13,"skipped":0,"pct":86.66},"functions":{"total":5,"covered":4,"skipped":0,"pct":80},"statements":{"total":15,"covered":13,"skipped":0,"pct":86.66},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}} } diff --git a/coverage/lcov-report/classes/TSinjex.ts.html b/coverage/lcov-report/classes/TSinjex.ts.html index 925e0bb..c9da5c0 100644 --- a/coverage/lcov-report/classes/TSinjex.ts.html +++ b/coverage/lcov-report/classes/TSinjex.ts.html @@ -223,7 +223,7 @@       -16x +22x       @@ -237,11 +237,11 @@       -33x -16x +45x +22x     -33x +45x       @@ -287,7 +287,7 @@       -11x +17x       @@ -297,22 +297,22 @@       -18x +24x   -18x +24x 2x -16x +22x 1x     -15x +21x 1x     1x     -15x +21x       @@ -433,7 +433,7 @@ export class TSinjex implements ITSinjex { }   if (dependency.deprecated) { - console.warn(`Dependency ${identifier} is deprecated`); + console.warn(`Dependency ${identifier.toString()} is deprecated`);   // Remove the deprecation warning; it should only be logged once. dependency.deprecated = false; @@ -451,7 +451,7 @@ export class TSinjex implements ITSinjex {
  • A decorator to inject a dependency from a DI (Dependency Injection) container into a class property.

    +Inject | ts-injex - v0.1.0
    • A decorator to inject a dependency from a DI (Dependency Injection) container into a class property.

      Type Parameters

      • T

        The type of the dependency to be injected.

      • U

        The type of the property to be injected.

        -

      Parameters

      • identifier: string

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

        -
      • Optionalinit: InitDelegate<T, U>

        An optional initializer function to transform the dependency before injection.

        +

    Parameters

    • identifier: Identifier

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

      +
    • Optionalinit: true | InitDelegate<T, U>

      Optional an initializer function to transform the dependency before injection +or true to instantiate the dependency if it has a constructor.

    • necessary: boolean = true

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

    Returns ((target: unknown, propertyKey: string | symbol) => void)

    The resolved dependency or undefined if the dependency is not necessary and not found, or throws an error if the dependency is necessary and not found.

    @@ -10,11 +11,15 @@ and not found, or throws an error if the dependency is necessary and not found.<
  • Identifier for more information on identifiers.
  • InitDelegate for more information on initializer functions.
-

A DependencyResolutionError if the dependency is not found and necessary.

+

Only throws errors if the dependency is necessary.

+

A DependencyResolutionError if the dependency is not found.

+

A InjectorError if an error occurs during the injection process.

+

A NoInstantiationMethodError if the dependency does not have a constructor.

+

An InitializationError if an error occurs during the initialization process.

class MyClass {
@Inject<MyDependency>('MyDependencyIdentifier')
private myDependency!: MyDependency;
}
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 19098ad..2533f11 100644 --- a/functions/decorators_Register.Register.html +++ b/functions/decorators_Register.Register.html @@ -1,6 +1,6 @@ -Register | ts-injex - v0.0.13
  • A decorator to register a class in the TSinjex DI (Dependency Injection) container.

    +Register | ts-injex - v0.1.0
    • A decorator to register a class in the TSinjex DI (Dependency Injection) container.

      Type Parameters

      • TargetType extends (new (...args: unknown[]) => InstanceType<TargetType>)

        The type of the class to be registered.

        -

      Parameters

      • identifier: string

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

        +

    Parameters

    • identifier: Identifier

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

    • Optionaldeprecated: boolean

      If true, the dependency is deprecated and a warning is logged only once upon the first resolution of the dependency.

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

    The decorator function to be applied on the class.

    @@ -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 63a516d..64f373c 100644 --- a/functions/decorators_RegisterInstance.RegisterInstance.html +++ b/functions/decorators_RegisterInstance.RegisterInstance.html @@ -1,6 +1,6 @@ -RegisterInstance | ts-injex - v0.0.13
  • A decorator to register an instance of a class in the DI (Dependency Injection) container.

    +RegisterInstance | ts-injex - v0.1.0
    • A decorator to register an instance of a class in the DI (Dependency Injection) container.

      Type Parameters

      • TargetType extends (new (..._args: unknown[]) => InstanceType<TargetType>)

        The type of the class whose instance is to be registered.

        -

      Parameters

      • identifier: string

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

        +

    Parameters

    • identifier: Identifier

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

    • Optionalinit: InitDelegate<TargetType & (new (..._args: unknown[]) => InstanceType<TargetType>), InstanceType<TargetType>>

      An optional initializer function which get the constructor of the class as input and returns an instance of the class.

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

    The decorator function to be applied on the class.

    @@ -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 ff42a17..5a8ddde 100644 --- a/functions/functions_register.register.html +++ b/functions/functions_register.register.html @@ -1,16 +1,16 @@ -register | ts-injex - v0.0.13

Register a dependency.

+register | ts-injex - v0.1.0

Register a dependency.

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

Identifier for more information on identifiers.

The dependency to register.

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

  • Register a dependency.

    -

    Type Parameters

    • T

    Parameters

    • identifier: string

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

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

        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.

      -

      Type Parameters

      • T

      Parameters

      • identifier: string

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

        +
      • Register a dependency.

        +

        Type Parameters

        • T

        Parameters

        • identifier: Identifier

          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 ec47563..e0b8824 100644 --- a/functions/functions_resolve.resolve.html +++ b/functions/functions_resolve.resolve.html @@ -1,4 +1,4 @@ -resolve | ts-injex - v0.0.13

Resolve a dependency.

+resolve | ts-injex - v0.1.0

Resolve a dependency.

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

Identifier for more information on identifiers.

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

@@ -6,13 +6,13 @@ and not found, or throws an error if the dependency is necessary and not found.

A DependencyResolutionError if the dependency is not found and necessary.

  • Resolve a dependency.

    -

    Type Parameters

    • T

    Parameters

    • identifier: string

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

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

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

      Returns T

      The resolved dependency.

      Identifier for more information on identifiers.

      A DependencyResolutionError if the dependency is not found.

      -
    • Resolve a dependency

      -

      Type Parameters

      • T

      Parameters

      • identifier: string

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

        +
      • Resolve a dependency

        +

        Type Parameters

        • T

        Parameters

        • identifier: Identifier

          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 4d8c073..acf1409 100644 --- a/functions/helper_ImplementsStatic.ImplementsStatic.html +++ b/functions/helper_ImplementsStatic.ImplementsStatic.html @@ -1,4 +1,4 @@ -ImplementsStatic | ts-injex - v0.0.13
  • Decorator to enforce static implementation of an interface. +ImplementsStatic | ts-injex - v0.1.0

    • 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/hierarchy.html b/hierarchy.html index fb775e3..648c08b 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -1 +1 @@ -ts-injex - v0.0.13

ts-injex - v0.0.13

Class Hierarchy

+ts-injex - v0.1.0

ts-injex - v0.1.0

Class Hierarchy

diff --git a/index.html b/index.html index f3567ee..6a826ca 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,8 @@ -ts-injex - v0.0.13

ts-injex - v0.0.13

Time

+ts-injex - v0.1.0

ts-injex - v0.1.0

Time

Statements Branches Functions Lines

-

TSinjex

module.exports = {
setupFilesAfterEnv: ['./scripts/jest.setup.js'],
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.test.ts', '**/?(*.)+(test).ts'],
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1', // Map src to the source folder
'^ts-injex$': '<rootDir>/node_modules/ts-injex/src', // Map ts-injex to the source folder
},
transformIgnorePatterns: [
'node_modules/(?!ts-injex)' // **Dont** ignore ts-injex on preset `ts-jest`
],
}; +

TSinjex

Strings and symbols are possible for the identifiers.

+

For the use of TSinjex with Jest, the corresponding source files can be found under ./src of the TSinjex node_module folder. To use these files, the moduleNameMapper must be configured in the Jest configuration file. The following example shows how to configure the Jest configuration file to use the source files of TSinjex.

+
module.exports = {
setupFilesAfterEnv: ['./scripts/jest.setup.js'],
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.test.ts', '**/?(*.)+(test).ts'],
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1', // Map src to the source folder
'^ts-injex$': '<rootDir>/node_modules/ts-injex/src', // Map ts-injex to the source folder
},
transformIgnorePatterns: [
'node_modules/(?!ts-injex)' // **Dont** ignore ts-injex on preset `ts-jest`
],
};
-
+
diff --git a/interfaces/interfaces_IDependency.IDependency.html b/interfaces/interfaces_IDependency.IDependency.html index 4d8ebe2..93b05d3 100644 --- a/interfaces/interfaces_IDependency.IDependency.html +++ b/interfaces/interfaces_IDependency.IDependency.html @@ -1,7 +1,7 @@ -IDependency | ts-injex - v0.0.13

Dependency Entry Interface

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

Properties

dependency +IDependency | ts-injex - v0.1.0

Dependency Entry Interface

+
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 73d00bf..28ffd62 100644 --- a/interfaces/interfaces_ITSinjex.ITSinjex.html +++ b/interfaces/interfaces_ITSinjex.ITSinjex.html @@ -1,31 +1,31 @@ -ITSinjex | ts-injex - v0.0.13

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

register +ITSinjex | ts-injex - v0.1.0

Instance TSinjex Interface

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

Hierarchy (view full)

Implemented by

Methods

  • Register a dependency.

    -

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

        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.

      -

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

        +

      Returns void

    • Register a deprecated dependency.

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

        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.

      -

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

        +

      Returns void

    • Register a dependency.

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

        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

    +

    Type Parameters

    • T

    Parameters

    • identifier: Identifier

      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.

    -

    Type Parameters

    • T

    Parameters

+
diff --git a/interfaces/interfaces_ITSinjex.ITSinjexRegister.html b/interfaces/interfaces_ITSinjex.ITSinjexRegister.html index 6ca0d73..aa88b47 100644 --- a/interfaces/interfaces_ITSinjex.ITSinjexRegister.html +++ b/interfaces/interfaces_ITSinjex.ITSinjexRegister.html @@ -1,16 +1,16 @@ -ITSinjexRegister | ts-injex - v0.0.13

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

register +ITSinjexRegister | ts-injex - v0.1.0

Register method for static and instance Dependency Injection Container.

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

Hierarchy (view full)

Methods

Methods

  • Register a dependency.

    -

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

        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.

      -

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

        +

      Returns void

    • Register a deprecated dependency.

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

        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.

      -

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

        +

      Returns void

    • Register a dependency.

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

        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 5fb6640..c1de007 100644 --- a/interfaces/interfaces_ITSinjex.ITSinjexResolve.html +++ b/interfaces/interfaces_ITSinjex.ITSinjexResolve.html @@ -1,17 +1,17 @@ -ITSinjexResolve | ts-injex - v0.0.13

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

resolve +ITSinjexResolve | ts-injex - v0.1.0

Resolve method for static and instance Dependency Injection Container.

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

Hierarchy (view full)

Methods

Methods

  • Resolve a dependency

    -

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency

      +

      Type Parameters

      • T

      Parameters

      • identifier: Identifier

        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.

      -

      Type Parameters

      • T

      Parameters

      • identifier: string

        The identifier of the dependency.

        +
      • Resolve a necessary dependency.

        +

        Type Parameters

        • T

        Parameters

        • identifier: Identifier

          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

        -

        Type Parameters

        • T

        Parameters

        • identifier: string

          The identifier of the dependency

          +
        • Resolve a non necessary dependency

          +

          Type Parameters

          • T

          Parameters

          • identifier: Identifier

            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 bb76774..d384a8c 100644 --- a/interfaces/interfaces_ITSinjex.ITSinjex_.html +++ b/interfaces/interfaces_ITSinjex.ITSinjex_.html @@ -1,34 +1,34 @@ -ITSinjex_ | ts-injex - v0.0.13

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

getInstance +ITSinjex_ | ts-injex - v0.1.0

Static TSInjex Interface

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

Hierarchy (view full)

Methods

  • Register a dependency.

    -

    Type Parameters

    • T

    Parameters

  • Register a dependency.

    +

    Type Parameters

    • T

    Parameters

    • identifier: Identifier

      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.

    -

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

      +

    Returns void

  • Register a deprecated dependency.

    +

    Type Parameters

    • T

    Parameters

    • identifier: Identifier

      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.

    -

    Type Parameters

    • T

    Parameters

    • identifier: string

      The identifier of the dependency.

      +

    Returns void

  • Register a dependency.

    +

    Type Parameters

    • T

    Parameters

    • identifier: Identifier

      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

    +

    Type Parameters

    • T

    Parameters

    • identifier: Identifier

      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.

    -

    Type Parameters

    • T

    Parameters

+
diff --git a/modules/classes_TSinjex.html b/modules/classes_TSinjex.html index 069a23d..b09047b 100644 --- a/modules/classes_TSinjex.html +++ b/modules/classes_TSinjex.html @@ -1,2 +1,2 @@ -classes/TSinjex | ts-injex - v0.0.13

Module classes/TSinjex

Index

Classes

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

Module classes/TSinjex

Index

Classes

diff --git a/modules/decorators_Inject.html b/modules/decorators_Inject.html index 48d4c0b..46c29c0 100644 --- a/modules/decorators_Inject.html +++ b/modules/decorators_Inject.html @@ -1,2 +1,2 @@ -decorators/Inject | ts-injex - v0.0.13

Module decorators/Inject

Index

Functions

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

Module decorators/Inject

Index

Functions

diff --git a/modules/decorators_Register.html b/modules/decorators_Register.html index 6f16936..6727a8d 100644 --- a/modules/decorators_Register.html +++ b/modules/decorators_Register.html @@ -1,2 +1,2 @@ -decorators/Register | ts-injex - v0.0.13

Module decorators/Register

Index

Functions

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

Module decorators/Register

Index

Functions

diff --git a/modules/decorators_RegisterInstance.html b/modules/decorators_RegisterInstance.html index 4a3e680..cd0b302 100644 --- a/modules/decorators_RegisterInstance.html +++ b/modules/decorators_RegisterInstance.html @@ -1,2 +1,2 @@ -decorators/RegisterInstance | ts-injex - v0.0.13

Module decorators/RegisterInstance

Index

Functions

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

Module decorators/RegisterInstance

Index

Functions

diff --git a/modules/functions_register.html b/modules/functions_register.html index 0cc09fc..8b7d20b 100644 --- a/modules/functions_register.html +++ b/modules/functions_register.html @@ -1,2 +1,2 @@ -functions/register | ts-injex - v0.0.13

Module functions/register

Index

Functions

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

Module functions/register

Index

Functions

diff --git a/modules/functions_resolve.html b/modules/functions_resolve.html index 7bd7cc9..7ad5501 100644 --- a/modules/functions_resolve.html +++ b/modules/functions_resolve.html @@ -1,2 +1,2 @@ -functions/resolve | ts-injex - v0.0.13

Module functions/resolve

Index

Functions

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

Module functions/resolve

Index

Functions

diff --git a/modules/helper_ImplementsStatic.html b/modules/helper_ImplementsStatic.html index 111ebb9..7659129 100644 --- a/modules/helper_ImplementsStatic.html +++ b/modules/helper_ImplementsStatic.html @@ -1,2 +1,2 @@ -helper/ImplementsStatic | ts-injex - v0.0.13

Module helper/ImplementsStatic

Index

Functions

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

Module helper/ImplementsStatic

Index

Functions

diff --git a/modules/index.html b/modules/index.html index 23e9aba..e977492 100644 --- a/modules/index.html +++ b/modules/index.html @@ -1,4 +1,4 @@ -index | ts-injex - v0.0.13

Module index

References

ForceConstructor +index | ts-injex - v0.1.0

Module index

References

Re-exports ForceConstructor
Re-exports GenericConstructor
Re-exports ITSinjex
Re-exports ITSinjexRegister
Re-exports ITSinjexResolve
Re-exports ITSinjex_
Re-exports InitDelegate
Re-exports Inject
Re-exports Register
Re-exports RegisterInstance
Re-exports TSinjex
Re-exports register
Re-exports resolve
+

References

Re-exports ForceConstructor
Re-exports GenericConstructor
Re-exports ITSinjex
Re-exports ITSinjexRegister
Re-exports ITSinjexResolve
Re-exports ITSinjex_
Re-exports InitDelegate
Re-exports Inject
Re-exports Register
Re-exports RegisterInstance
Re-exports TSinjex
Re-exports register
Re-exports resolve
diff --git a/modules/interfaces_Exceptions.html b/modules/interfaces_Exceptions.html index 74ea6ba..ddf7980 100644 --- a/modules/interfaces_Exceptions.html +++ b/modules/interfaces_Exceptions.html @@ -1,3 +1,6 @@ -interfaces/Exceptions | ts-injex - v0.0.13

Module interfaces/Exceptions

Index

Classes

DependencyResolutionError +interfaces/Exceptions | ts-injex - v0.1.0
+
diff --git a/modules/interfaces_IDependency.html b/modules/interfaces_IDependency.html index b41c270..06222bf 100644 --- a/modules/interfaces_IDependency.html +++ b/modules/interfaces_IDependency.html @@ -1,2 +1,2 @@ -interfaces/IDependency | ts-injex - v0.0.13

Module interfaces/IDependency

Index

Interfaces

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

Module interfaces/IDependency

Index

Interfaces

diff --git a/modules/interfaces_ITSinjex.html b/modules/interfaces_ITSinjex.html index b4a70d3..2312f49 100644 --- a/modules/interfaces_ITSinjex.html +++ b/modules/interfaces_ITSinjex.html @@ -1,5 +1,5 @@ -interfaces/ITSinjex | ts-injex - v0.0.13

Module interfaces/ITSinjex

Index

Interfaces

ITSinjex +interfaces/ITSinjex | ts-injex - v0.1.0
+
diff --git a/modules/types_GenericContructor.html b/modules/types_GenericContructor.html index 3161768..778ce37 100644 --- a/modules/types_GenericContructor.html +++ b/modules/types_GenericContructor.html @@ -1,3 +1,3 @@ -types/GenericContructor | ts-injex - v0.0.13

Module types/GenericContructor

Index

Type Aliases

ForceConstructor +types/GenericContructor | ts-injex - v0.1.0
+
diff --git a/modules/types_Identifier.html b/modules/types_Identifier.html index 2384bfa..c2b1576 100644 --- a/modules/types_Identifier.html +++ b/modules/types_Identifier.html @@ -1,2 +1,2 @@ -types/Identifier | ts-injex - v0.0.13

Module types/Identifier

Index

Type Aliases

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

Module types/Identifier

Index

Type Aliases

diff --git a/modules/types_InitDelegate.html b/modules/types_InitDelegate.html index 6d15d9b..c39536d 100644 --- a/modules/types_InitDelegate.html +++ b/modules/types_InitDelegate.html @@ -1,2 +1,2 @@ -types/InitDelegate | ts-injex - v0.0.13

Module types/InitDelegate

Index

Type Aliases

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

Module types/InitDelegate

Index

Type Aliases

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

Force generic constructor type. +ForceConstructor | ts-injex - v0.1.0

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 076b520..7784dac 100644 --- a/types/types_GenericContructor.GenericConstructor.html +++ b/types/types_GenericContructor.GenericConstructor.html @@ -1,3 +1,3 @@ -GenericConstructor | ts-injex - v0.0.13
GenericConstructor<T>: (new (...args: ConstructorParameters<T>) => T)

Generic constructor type. +GenericConstructor | ts-injex - v0.1.0

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 0d4dde1..49c215c 100644 --- a/types/types_Identifier.Identifier.html +++ b/types/types_Identifier.Identifier.html @@ -1,4 +1,4 @@ -Identifier | ts-injex - v0.0.13
Identifier: string

The dependency identifier. +Identifier | ts-injex - v0.1.0

Identifier: string | symbol

The dependency identifier. You can use any string as identifier. To create order, it is also possible to provide these with a separator: GroupA.ClassZ. @@ -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 8b9642f..68db19d 100644 --- a/types/types_InitDelegate.InitDelegate.html +++ b/types/types_InitDelegate.InitDelegate.html @@ -1,7 +1,7 @@ -InitDelegate | ts-injex - v0.0.13

Type Alias InitDelegate<T, U>

InitDelegate<T, U>: ((x: T) => U)

A function type representing an initializer that transforms an input of type T +InitDelegate | ts-injex - v0.1.0

Type Alias InitDelegate<T, U>

InitDelegate<T, U>: ((x: T) => U)

A function type representing an initializer that transforms an input of type T into an output of type U.

Type Parameters

  • T

    The type of the input parameter.

  • 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.

      -
+