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

cheap-di

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cheap-di - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

dist/ContainerImpl.d.ts

@@ -14,3 +14,3 @@ import { Constructor, Container, RegistrationType, AbstractConstructor, ImplementationType } from './types';

registerInstance<TInstance extends Object>(instance: TInstance): {
as: <TBase extends Partial<TInstance>>(type: Constructor<TBase>) => void;
as: <TBase extends Partial<TInstance>>(type: RegistrationType<TBase>) => void;
};

@@ -17,0 +17,0 @@ private getImplementation;

declare type AbstractConstructor<T = any> = abstract new (...args: any[]) => T;
declare type Constructor<T = any> = new (...args: any[]) => T;
declare type Dependency<T = any> = (Constructor<T> | AbstractConstructor<T>);
declare type ImplementationType<TInstance> = Constructor<TInstance> & {
declare type ImplementationType<TClass> = Constructor<TClass> & {
__dependencies?: Dependency[];

@@ -12,4 +12,4 @@ };

interface DependencyRegistrator {
registerType: <TInstance>(implementationType: ImplementationType<TInstance>) => {
as: <TBase extends Partial<TInstance>>(type: RegistrationType<TBase>) => {
registerType: <TClass>(implementationType: ImplementationType<TClass>) => {
as: <TBase extends Partial<TClass>>(type: RegistrationType<TBase>) => {
with: (...injectionParams: any[]) => void;

@@ -20,3 +20,3 @@ };

registerInstance: <TInstance extends Object>(instance: TInstance) => {
as: <TBase extends Partial<TInstance>>(type: Constructor<TBase>) => void;
as: <TBase extends Partial<TInstance>>(type: RegistrationType<TBase>) => void;
};

@@ -23,0 +23,0 @@ }

{
"name": "cheap-di",
"version": "2.0.3",
"version": "2.0.4",
"description": "JavaScript dependency injection like Autofac in .Net",

@@ -5,0 +5,0 @@ "scripts": {

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