Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typedi

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typedi - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

15

Container.d.ts

@@ -28,2 +28,17 @@ import { ServiceMetadata } from "./types/ServiceMetadata";

/**
* Checks if the service with given name or type is registered service container.
* Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
*/
static has<T>(type: ObjectType<T>): boolean;
/**
* Checks if the service with given name or type is registered service container.
* Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
*/
static has<T>(id: string): boolean;
/**
* Checks if the service with given name or type is registered service container.
* Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
*/
static has<T>(id: Token<T>): boolean;
/**
* Retrieves the service with given name or type from the service container.

@@ -30,0 +45,0 @@ * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.

@@ -27,2 +27,9 @@ "use strict";

/**
* Checks if the service with given name or type is registered service container.
* Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
*/
Container.has = function (identifier) {
return this.globalInstance.has(identifier);
};
/**
* Retrieves the service with given name or type from the service container.

@@ -29,0 +36,0 @@ * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.

@@ -20,2 +20,17 @@ import { ServiceMetadata } from "./types/ServiceMetadata";

/**
* Checks if the service with given name or type is registered service container.
* Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
*/
has<T>(type: ObjectType<T>): boolean;
/**
* Checks if the service with given name or type is registered service container.
* Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
*/
has<T>(id: string): boolean;
/**
* Checks if the service with given name or type is registered service container.
* Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
*/
has<T>(id: Token<T>): boolean;
/**
* Retrieves the service with given name or type from the service container.

@@ -22,0 +37,0 @@ * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.

@@ -26,2 +26,9 @@ "use strict";

/**
* Checks if the service with given name or type is registered service container.
* Optionally, parameters can be passed in case if instance is initialized in the container for the first time.
*/
ContainerInstance.prototype.has = function (identifier) {
return !!this.findService(identifier);
};
/**
* Retrieves the service with given name or type from the service container.

@@ -28,0 +35,0 @@ * Optionally, parameters can be passed in case if instance is initialized in the container for the first time.

2

package.json
{
"name": "typedi",
"version": "0.6.0",
"version": "0.6.1",
"description": "Dependency injection for TypeScript",

@@ -5,0 +5,0 @@ "license": "MIT",

# TypeDI
[![Build Status](https://travis-ci.org/pleerock/typedi.svg?branch=master)](https://travis-ci.org/pleerock/typedi)
[![Build Status](https://travis-ci.org/typestack/typedi.svg?branch=master)](https://travis-ci.org/typestack/typedi)
[![npm version](https://badge.fury.io/js/typedi.svg)](https://badge.fury.io/js/typedi)
[![Dependency Status](https://david-dm.org/pleerock/typedi.svg)](https://david-dm.org/pleerock/typedi)
[![Join the chat at https://gitter.im/pleerock/typedi](https://badges.gitter.im/pleerock/typedi.svg)](https://gitter.im/pleerock/typedi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Dependency Status](https://david-dm.org/typestack/typedi.svg)](https://david-dm.org/typestack/typedi)
[![Join the chat at https://gitter.im/typestack/typedi](https://badges.gitter.im/typestack/typedi.svg)](https://gitter.im/typestack/typedi?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

@@ -8,0 +8,0 @@ TypeDI is a [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) tool for TypeScript.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc