Socket
Socket
Sign inDemoInstall

tsyringe

Package Overview
Dependencies
1
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.1.0

6

dist/decorators.js

@@ -21,2 +21,8 @@ "use strict";

exports.injectable = injectable;
function singleton() {
return function (target) {
dependency_container_1.instance.registerSingleton(target);
};
}
exports.singleton = singleton;
function autoInjectable() {

@@ -23,0 +29,0 @@ return function (target) {

19

package.json
{
"name": "tsyringe",
"version": "2.0.1",
"version": "2.1.0",
"description": "Lightweight dependency injection container for JavaScript/TypeScript",

@@ -33,3 +33,2 @@ "main": "dist/index.js",

"jest": {
"mapCoverage": true,
"collectCoverageFrom": [

@@ -63,15 +62,15 @@ "src/**/*.ts",

"dependencies": {
"reflect-metadata": "^0.1.10"
"reflect-metadata": "^0.1.12"
},
"devDependencies": {
"@types/jest": "^22.1.2",
"@types/node": "^8.0.53",
"@types/jest": "^22.2.3",
"@types/node": "^8.10.16",
"husky": "^0.14.3",
"jest": "^22.2.2",
"jest": "^22.4.3",
"rimraf": "^2.6.2",
"ts-jest": "^22.0.4",
"tslint": "^5.9.1",
"tslint-eslint-rules": "^5.0.0",
"typescript": "^2.6.1"
"ts-jest": "^22.4.6",
"tslint": "^5.10.0",
"tslint-eslint-rules": "^5.3.1",
"typescript": "^2.8.3"
}
}
[![Travis](https://img.shields.io/travis/Microsoft/tsyringe.svg)](https://travis-ci.org/Microsoft/tsyringe/)
[![npm](https://img.shields.io/npm/v/tsyringe.svg)](https://www.npmjs.com/package/tsyringe)
[![npm](https://img.shields.io/npm/dt/tsyringe.svg)](https://www.npmjs.com/package/tsyringe)

@@ -160,4 +162,4 @@ # TSyringe

container.register({
token: "SuperService",
container.register(
"SuperService", {
useClass: TestService

@@ -164,0 +166,0 @@ });

@@ -5,2 +5,3 @@ import "reflect-metadata";

export declare function injectable<T>(): (target: constructor<T>) => void;
export declare function singleton<T>(): (target: constructor<T>) => void;
export declare function autoInjectable(): (target: constructor<any>) => any;

@@ -7,0 +8,0 @@ export declare function inject(token: InjectionToken<any>): (target: any, propertyKey: string | symbol, parameterIndex: number) => any;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc