@furystack/inject
Advanced tools
Comparing version 12.0.1 to 12.0.2
export * from './injectable.js'; | ||
export * from './injected.js'; | ||
export * from './injector.js'; | ||
export * from './injected.js'; | ||
export * from './models/index.js'; | ||
export * from './with-injector-reference.js'; | ||
//# sourceMappingURL=index.d.ts.map |
export * from './injectable.js'; | ||
export * from './injected.js'; | ||
export * from './injector.js'; | ||
export * from './injected.js'; | ||
export * from './models/index.js'; | ||
export * from './with-injector-reference.js'; | ||
//# sourceMappingURL=index.js.map |
@@ -0,6 +1,6 @@ | ||
import type { Injector } from './injector.js'; | ||
import type { Constructable } from './models/constructable.js'; | ||
import type { Injector } from './injector.js'; | ||
export declare const InjectableDependencyList: unique symbol; | ||
export declare const getDependencyList: <T extends Constructable<unknown>>(ctor: T) => Set<Constructable<any>>; | ||
export declare const getDependencyList: <T extends Constructable<unknown>>(ctor: T) => Set<Constructable<unknown>>; | ||
export declare const Injected: <T>(injectable: Constructable<unknown> | ((injector: Injector) => T)) => PropertyDecorator; | ||
//# sourceMappingURL=injected.d.ts.map |
@@ -0,3 +1,3 @@ | ||
import { hasInjectableOptions } from './injectable.js'; | ||
import { getInjectorReference } from './with-injector-reference.js'; | ||
import { hasInjectableOptions } from './injectable.js'; | ||
export const InjectableDependencyList = Symbol('InjectableDependencyList'); | ||
@@ -4,0 +4,0 @@ export const getDependencyList = (ctor) => { |
{ | ||
"name": "@furystack/inject", | ||
"version": "12.0.1", | ||
"version": "12.0.2", | ||
"description": "Core FuryStack package", | ||
@@ -40,9 +40,9 @@ "type": "module", | ||
"dependencies": { | ||
"@furystack/utils": "^8.0.1" | ||
"@furystack/utils": "^8.0.2" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.5.3", | ||
"vitest": "^2.0.3" | ||
"typescript": "^5.5.4", | ||
"vitest": "^2.0.5" | ||
}, | ||
"gitHead": "1045d854bfd8c475b7035471d130d401417a2321" | ||
} |
export * from './injectable.js' | ||
export * from './injected.js' | ||
export * from './injector.js' | ||
export * from './injected.js' | ||
export * from './models/index.js' | ||
export * from './with-injector-reference.js' |
@@ -28,4 +28,4 @@ import type { Constructable } from './models/constructable.js' | ||
return ( | ||
typeof (ctor as any)[InjectableOptionsSymbol] === 'object' && | ||
typeof ((ctor as any)[InjectableOptionsSymbol] as InjectableOptions).lifetime === 'string' | ||
typeof (ctor as WithInjectableOptions<T>)[InjectableOptionsSymbol] === 'object' && | ||
typeof (ctor as WithInjectableOptions<T>)[InjectableOptionsSymbol].lifetime === 'string' | ||
) | ||
@@ -32,0 +32,0 @@ } |
@@ -0,10 +1,10 @@ | ||
import { hasInjectableOptions } from './injectable.js' | ||
import type { Injector } from './injector.js' | ||
import type { Constructable } from './models/constructable.js' | ||
import { getInjectorReference } from './with-injector-reference.js' | ||
import type { Constructable } from './models/constructable.js' | ||
import type { Injector } from './injector.js' | ||
import { hasInjectableOptions } from './injectable.js' | ||
export const InjectableDependencyList = Symbol('InjectableDependencyList') | ||
export const getDependencyList = <T extends Constructable<unknown>>(ctor: T): Set<Constructable<any>> => { | ||
const existing = (ctor as any)[InjectableDependencyList] as Set<Constructable<any>> | ||
export const getDependencyList = <T extends Constructable<unknown>>(ctor: T): Set<Constructable<unknown>> => { | ||
const existing = (ctor as T & { [InjectableDependencyList]: Set<Constructable<any>> })[InjectableDependencyList] | ||
if (existing && existing instanceof Set) { | ||
@@ -11,0 +11,0 @@ return existing |
@@ -7,4 +7,4 @@ import { isAsyncDisposable, isDisposable } from '@furystack/utils' | ||
const hasInitMethod = (obj: Object): obj is { init: (injector: Injector) => void } => { | ||
return typeof (obj as any).init === 'function' | ||
const hasInitMethod = (obj: object): obj is { init: (injector: Injector) => void } => { | ||
return typeof (obj as { init?: (injector: Injector) => void }).init === 'function' | ||
} | ||
@@ -11,0 +11,0 @@ |
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
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
108339
1446
Updated@furystack/utils@^8.0.2