mana-syringe
Advanced tools
Comparing version 0.2.0 to 0.2.1
import 'reflect-metadata'; | ||
export declare const getLogger: (namespace: string, delimiter?: string | undefined) => import("debug").Debugger; | ||
export declare type TokenOption = { | ||
@@ -4,0 +3,0 @@ multiple?: boolean; |
{ | ||
"name": "mana-syringe", | ||
"keywords": [], | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"typings": "dist/index.d.ts", | ||
"main": "dist/index.js", | ||
"module": "dist/index.esm.js", | ||
"browser": "index.umd.js", | ||
"files": [ | ||
@@ -15,3 +16,2 @@ "package.json", | ||
"dependencies": { | ||
"debug": "^4.3.1", | ||
"inversify": "^5.0.1" | ||
@@ -29,3 +29,3 @@ }, | ||
}, | ||
"gitHead": "6d25a80429a48414e6d8291097c9a335b83e20e9" | ||
"gitHead": "8d6f4622e203b5df7ead3650699aeb8dca719a03" | ||
} |
@@ -177,4 +177,4 @@ # mana-syringe | ||
```typescript | ||
const Waepon = Syringe.defineToken('Weapon'); | ||
Contribution.register(GlobalContainer.register, Waepon); | ||
const Weapon = Syringe.defineToken('Weapon'); | ||
Contribution.register(GlobalContainer.register, Weapon); | ||
``` | ||
@@ -200,4 +200,4 @@ | ||
```typescript | ||
const Waepon = Syringe.defineToken('Weapon'); | ||
Contribution.register(GlobalContainer.register, Waepon); | ||
const Weapon = Syringe.defineToken('Weapon'); | ||
Contribution.register(GlobalContainer.register, Weapon); | ||
@singleton({ contrib: Weapon }) | ||
@@ -204,0 +204,0 @@ class Shuriken implements Weapon { |
@@ -5,8 +5,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import 'reflect-metadata'; | ||
import { debug } from 'debug'; | ||
const log = debug('[mana-syringe]'); | ||
export const getLogger = log.extend; | ||
export type TokenOption = { | ||
@@ -13,0 +8,0 @@ multiple?: boolean; |
@@ -10,7 +10,5 @@ import type { interfaces } from 'inversify'; | ||
} from './inversify'; | ||
import { Utils, Syringe, getLogger } from './core'; | ||
import { Utils, Syringe } from './core'; | ||
import { OptionSymbol } from './side-option'; | ||
const log = getLogger('register'); | ||
export function toRegistryOption<P>( | ||
@@ -26,5 +24,2 @@ options: Syringe.InjectOption<P>, | ||
if (contrib.length > 0 && lifecycle !== Syringe.Lifecycle.singleton) { | ||
log('Contrib should use singleton scope', token[0]); | ||
} | ||
const generalOption: Syringe.FormattedInjectOption<P> = { | ||
@@ -109,3 +104,2 @@ token, | ||
) { | ||
log('No value to register for token:', parsedOption.token); | ||
return; | ||
@@ -112,0 +106,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
862385
1
53
9082
- Removeddebug@^4.3.1
- Removeddebug@4.3.7(transitive)
- Removedms@2.1.3(transitive)