+2
-2
| { | ||
| "name": "injectly", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "Lightweight dependency injector", | ||
| "main": "./dist/injectly.js", | ||
| "main": "dist/injectly.js", | ||
| "scripts": { | ||
@@ -7,0 +7,0 @@ "test": "echo \"Error: no test specified\" && exit 1" |
| export declare class Injector { | ||
| private resolver; | ||
| constructor(); | ||
| resolve<T>(name: string): T; | ||
| inject(dependencyNames: string[], callback: any): void; | ||
| bindProvider(provider: IProvider): void; | ||
| bind(name: string, dependencies: string[], config?: IInjectableConfig): (target: Function) => void; | ||
| } |
| {"version":3,"file":"injector.js","sourceRoot":"","sources":["../src/injector.ts"],"names":[],"mappings":"AACA,YAAY,CAAC;AAEb,yBAAuB,YAAY,CAAC,CAAA;AAEpC;IAII;QACI,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IAEM,0BAAO,GAAd,UAAkB,IAAY;QAA9B,iBA+BC;QA9BG,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEnC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,iCAA+B,IAAM,CAAC,CAAC;QAC3D,CAAC;QAED,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;YACpB,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC7B,CAAC;QAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;YACnD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC7B,CAAC;QAED,IAAI,QAAQ,CAAC;QAEb,IAAI,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,UAAA,CAAC;YAC1C,MAAM,CAAC,KAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAC3B,C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AAY,EAAE,YAAY;SAC7B,CAAC,CAAC;QAEH,MAAM,CAAC,UAAC,MAAgB;YACpB,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;gBACrB,QAAQ,CAAC,WAAW,GAAG,MAAM,CAAC;YAClC,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,QAAQ,CAAC,QAAQ,GAAG,MAAM,CAAC;YAC/B,CAAC;YAED,KAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC,CAAC;IACN,CAAC;IACL,eAAC;AAAD,CAAC,AAvED,IAuEC;AAvEY,gBAAQ,WAuEpB,CAAA"} |
| export declare class Provider implements IProvider { | ||
| name: string; | ||
| useClass: any; | ||
| useExisting: any; | ||
| useValue: any; | ||
| useFactory: any; | ||
| dependencies: string[]; | ||
| instance: any; | ||
| constructor(name: string, config: IProviderConfig); | ||
| } |
| {"version":3,"file":"provider.js","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AACA,YAAY,CAAC;AAEb;IASI,kBAAmB,IAAY,EAAE,MAAuB;QAArC,SAAI,GAAJ,IAAI,CAAQ;QAC3B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC;IAClD,CAAC;IACL,eAAC;AAAD,CAAC,AAhBD,IAgBC;AAhBY,gBAAQ,WAgBpB,CAAA"} |
| interface IProviderConfig { | ||
| useClass?: any; | ||
| useExisting?: any; | ||
| useValue?: any; | ||
| useFactory?: any; | ||
| dependencies?: string[]; | ||
| } | ||
| interface IProvider { | ||
| useClass: any; | ||
| useExisting: any; | ||
| useValue: any; | ||
| useFactory: any; | ||
| dependencies: string[]; | ||
| instance: any; | ||
| name: string; | ||
| } | ||
| interface IInjector { | ||
| bind(provider: IProvider): any; | ||
| inject(dependencyNames: string[], callback: any): any; | ||
| resolve<T>(name: string): T; | ||
| } | ||
| interface IInjectableConfig { | ||
| useExisting?: boolean; | ||
| } |
| //# sourceMappingURL=types.js.map |
| {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""} |
| { | ||
| // See http://go.microsoft.com/fwlink/?LinkId=759670 | ||
| // for the documentation about the jsconfig.json format | ||
| "compilerOptions": { | ||
| "target": "es5", | ||
| "sourceMap": true, | ||
| "outDir": "dist", | ||
| "experimentalDecorators": true, | ||
| "declaration": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "pretty": true | ||
| }, | ||
| "exclude": [ | ||
| "node_modules", | ||
| "bower_components", | ||
| "jspm_packages", | ||
| "tmp", | ||
| "temp", | ||
| "bin", | ||
| "examples" | ||
| ] | ||
| } |
-75
| { | ||
| "rules": { | ||
| "class-name": true, | ||
| "comment-format": [true, "check-space"], | ||
| "curly": true, | ||
| "eofline": true, | ||
| "forin": true, | ||
| "indent": [true, "spaces"], | ||
| "label-position": true, | ||
| "label-undefined": true, | ||
| "max-line-length": [ false ], | ||
| "member-access": true, | ||
| "member-ordering": [true, | ||
| "public-before-private", | ||
| "static-before-instance", | ||
| "variables-before-functions" | ||
| ], | ||
| "no-arg": true, | ||
| "no-bitwise": true, | ||
| "no-console": [true, | ||
| "debug", | ||
| "info", | ||
| "time", | ||
| "timeEnd", | ||
| "trace" | ||
| ], | ||
| "no-construct": true, | ||
| "no-debugger": true, | ||
| "no-duplicate-key": true, | ||
| "no-duplicate-variable": true, | ||
| "no-empty": true, | ||
| "no-eval": true, | ||
| "no-inferrable-types": true, | ||
| "no-shadowed-variable": true, | ||
| "no-string-literal": true, | ||
| "no-switch-case-fall-through": true, | ||
| "no-trailing-whitespace": false, | ||
| "no-unused-expression": true, | ||
| "no-unused-variable": true, | ||
| "no-unreachable": true, | ||
| "no-use-before-declare": true, | ||
| "no-var-keyword": true, | ||
| "object-literal-sort-keys": true, | ||
| "one-line": [true, | ||
| "check-open-brace", | ||
| "check-catch", | ||
| "check-else", | ||
| "check-finally", | ||
| "check-whitespace" | ||
| ], | ||
| "quotemark": [true, "single", "avoid-escape"], | ||
| "radix": true, | ||
| "semicolon": [true, "always"], | ||
| "trailing-comma": [true, { | ||
| "singleline": "never", | ||
| "multiline": "always" | ||
| }], | ||
| "triple-equals": [true, "allow-null-check"], | ||
| "typedef-whitespace": [true, { | ||
| "call-signature": "nospace", | ||
| "index-signature": "nospace", | ||
| "parameter": "nospace", | ||
| "property-declaration": "nospace", | ||
| "variable-declaration": "nospace" | ||
| }], | ||
| "variable-name": false, | ||
| "whitespace": [true, | ||
| "check-branch", | ||
| "check-decl", | ||
| "check-operator", | ||
| "check-separator", | ||
| "check-type" | ||
| ] | ||
| } | ||
| } |
| { | ||
| "ambientDependencies": { | ||
| "node": "registry:dt/node#4.0.0+20160412142033" | ||
| } | ||
| } |
Sorry, the diff of this file is not supported yet
5891
-52%6
-62.5%85
-62.72%