@wendellhu/redi
Advanced tools
Comparing version 0.12.7 to 0.12.8
@@ -800,2 +800,11 @@ (function (global, factory) { | ||
/** | ||
* Check if the injector could initialize a dependency. | ||
* | ||
* @param id Identifier of the dependency | ||
*/ | ||
Injector.prototype.has = function (id) { | ||
var _a; | ||
return this.dependencyCollection.has(id) || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.has(id)) || false; | ||
}; | ||
/** | ||
* Get dependency instance(s). | ||
@@ -802,0 +811,0 @@ * |
@@ -64,2 +64,8 @@ import { Dependency, DependencyOrInstance } from './dependencyCollection'; | ||
invoke<T, P extends any[] = []>(cb: (accessor: IAccessor, ...args: P) => T, ...args: P): T; | ||
/** | ||
* Check if the injector could initialize a dependency. | ||
* | ||
* @param id Identifier of the dependency | ||
*/ | ||
has<T>(id: DependencyIdentifier<T>): boolean; | ||
get<T>(id: DependencyIdentifier<T>, lookUp?: LookUp): T; | ||
@@ -66,0 +72,0 @@ get<T>(id: DependencyIdentifier<T>, quantity: Quantity.MANY, lookUp?: LookUp): T[]; |
@@ -223,2 +223,11 @@ var __extends = (this && this.__extends) || (function () { | ||
/** | ||
* Check if the injector could initialize a dependency. | ||
* | ||
* @param id Identifier of the dependency | ||
*/ | ||
Injector.prototype.has = function (id) { | ||
var _a; | ||
return this.dependencyCollection.has(id) || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.has(id)) || false; | ||
}; | ||
/** | ||
* Get dependency instance(s). | ||
@@ -225,0 +234,0 @@ * |
@@ -794,2 +794,11 @@ var IdentifierDecoratorSymbol = Symbol('$$IDENTIFIER_DECORATOR'); | ||
/** | ||
* Check if the injector could initialize a dependency. | ||
* | ||
* @param id Identifier of the dependency | ||
*/ | ||
Injector.prototype.has = function (id) { | ||
var _a; | ||
return this.dependencyCollection.has(id) || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.has(id)) || false; | ||
}; | ||
/** | ||
* Get dependency instance(s). | ||
@@ -796,0 +805,0 @@ * |
{ | ||
"$schema": "https://raw.githubusercontent.com/wzhudev/squirrel/master/src/schema/package.schema.json", | ||
"name": "@wendellhu/redi", | ||
"version": "0.12.7", | ||
"version": "0.12.8", | ||
"description": "A dependency library for TypeScript and JavaScript, along with a binding for React.", | ||
@@ -6,0 +6,0 @@ "author": "Wenzhao Hu<wzhudev@outlook.com>", |
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
442682
4505