@furystack/inject
Advanced tools
Comparing version 4.0.13 to 4.0.14
@@ -15,5 +15,7 @@ import 'reflect-metadata'; | ||
* Decorator method for tagging a class as injectable | ||
* | ||
* @param options The options object | ||
* @returns void | ||
*/ | ||
export declare const Injectable: (options?: Partial<InjectableOptions> | undefined) => <T extends Constructable<any>>(ctor: T) => void; | ||
//# sourceMappingURL=injectable.d.ts.map |
@@ -13,3 +13,5 @@ "use strict"; | ||
* Decorator method for tagging a class as injectable | ||
* | ||
* @param options The options object | ||
* @returns void | ||
*/ | ||
@@ -16,0 +18,0 @@ exports.Injectable = (options) => { |
import { Disposable } from '@furystack/utils'; | ||
import { Constructable } from './types/constructable'; | ||
/** | ||
* Container for injectable instances | ||
*/ | ||
export declare class Injector implements Disposable { | ||
@@ -31,2 +28,3 @@ /** | ||
* @param dependencies Resolved dependencies (usually provided by the framework) | ||
* @returns The instance of the requested service | ||
*/ | ||
@@ -36,2 +34,3 @@ getInstance<T>(ctor: Constructable<T>, dependencies?: Array<Constructable<T>>): T; | ||
* Sets explicitliy an instance for a key in the store | ||
* | ||
* @param instance The created instance | ||
@@ -43,3 +42,5 @@ * @param key The class key to be persisted (optional, calls back to the instance's constructor) | ||
* Creates a child injector instance | ||
* | ||
* @param options Additional injector options | ||
* @returns the created Injector | ||
*/ | ||
@@ -46,0 +47,0 @@ createChild(options?: Partial<Injector['options']>): Injector; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const injectable_1 = require("./injectable"); | ||
/** | ||
* Container for injectable instances | ||
*/ | ||
class Injector { | ||
@@ -36,2 +33,3 @@ constructor() { | ||
* @param dependencies Resolved dependencies (usually provided by the framework) | ||
* @returns The instance of the requested service | ||
*/ | ||
@@ -85,2 +83,3 @@ getInstance(ctor, dependencies = []) { | ||
* Sets explicitliy an instance for a key in the store | ||
* | ||
* @param instance The created instance | ||
@@ -109,3 +108,5 @@ * @param key The class key to be persisted (optional, calls back to the instance's constructor) | ||
* Creates a child injector instance | ||
* | ||
* @param options Additional injector options | ||
* @returns the created Injector | ||
*/ | ||
@@ -112,0 +113,0 @@ createChild(options) { |
{ | ||
"name": "@furystack/inject", | ||
"version": "4.0.13", | ||
"version": "4.0.14", | ||
"description": "Core FuryStack package", | ||
@@ -27,20 +27,5 @@ "main": "dist/index.js", | ||
}, | ||
"nyc": { | ||
"exclude": [ | ||
"temp/test/**/*.*", | ||
"temp/src/Types/**/*.*" | ||
], | ||
"include": "temp/src/**/*.*", | ||
"check-coverage": true, | ||
"cache": true, | ||
"all": true, | ||
"reporter": [ | ||
"lcov", | ||
"text-summary", | ||
"json" | ||
] | ||
}, | ||
"homepage": "https://github.com/furystack/core.git", | ||
"dependencies": { | ||
"@furystack/utils": "^1.1.6", | ||
"@furystack/utils": "^1.1.7", | ||
"reflect-metadata": "^0.1.13", | ||
@@ -53,3 +38,3 @@ "tslib": "^1.11.1" | ||
"typings": "./dist/index.d.ts", | ||
"gitHead": "75c0e5966e4f8c7b758cd4a002da6e664b85a350" | ||
"gitHead": "f4e280db8dc81a721567306b502f80b71a88d913" | ||
} |
@@ -21,3 +21,5 @@ import 'reflect-metadata' | ||
* Decorator method for tagging a class as injectable | ||
* | ||
* @param options The options object | ||
* @returns void | ||
*/ | ||
@@ -24,0 +26,0 @@ export const Injectable = (options?: Partial<InjectableOptions>) => { |
@@ -5,5 +5,2 @@ import { Disposable } from '@furystack/utils' | ||
/** | ||
* Container for injectable instances | ||
*/ | ||
export class Injector implements Disposable { | ||
@@ -51,2 +48,3 @@ /** | ||
* @param dependencies Resolved dependencies (usually provided by the framework) | ||
* @returns The instance of the requested service | ||
*/ | ||
@@ -111,2 +109,3 @@ public getInstance<T>(ctor: Constructable<T>, dependencies: Array<Constructable<T>> = []): T { | ||
* Sets explicitliy an instance for a key in the store | ||
* | ||
* @param instance The created instance | ||
@@ -137,3 +136,5 @@ * @param key The class key to be persisted (optional, calls back to the instance's constructor) | ||
* Creates a child injector instance | ||
* | ||
* @param options Additional injector options | ||
* @returns the created Injector | ||
*/ | ||
@@ -140,0 +141,0 @@ public createChild(options?: Partial<Injector['options']>) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
860
68134
Updated@furystack/utils@^1.1.7