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 4.0.0-rc-7 to 4.0.0-rc-8

7

dist/cjs/decorators/inject.js

@@ -6,4 +6,4 @@ "use strict";

const workWithDiSettings_js_1 = require("../workWithDiSettings.js");
function inject(...dependencies) {
return (constructor, context) => {
exports.inject = ((...dependencies) => {
return (constructor) => {
(0, workWithDiSettings_js_1.workWithDiSettings)(constructor, (settings) => {

@@ -16,4 +16,3 @@ const metadata = (0, findMetadata_js_1.findOrCreateMetadata)(settings);

};
}
exports.inject = inject;
});
//# sourceMappingURL=inject.js.map
import { findOrCreateMetadata } from '../findMetadata.js';
import { workWithDiSettings } from '../workWithDiSettings.js';
export function inject(...dependencies) {
return (constructor, context) => {
export const inject = ((...dependencies) => {
return (constructor) => {
workWithDiSettings(constructor, (settings) => {

@@ -12,3 +12,3 @@ const metadata = findOrCreateMetadata(settings);

};
}
});
//# sourceMappingURL=inject.js.map
import { Constructor, SomeDependency } from '../types.js';
export declare function inject<TClass extends Constructor>(...dependencies: SomeDependency[]): (constructor: TClass, context?: ClassDecoratorContext) => TClass;
export interface InjectDecorator {
<TClass extends Constructor>(...dependencies: SomeDependency[]): (constructor: TClass, context: ClassDecoratorContext) => TClass;
<TClass extends Constructor>(...dependencies: SomeDependency[]): (constructor: TClass) => TClass;
}
export declare const inject: InjectDecorator;

@@ -11,3 +11,2 @@ export * from './cheapDiSymbol.js';

import { ContainerImpl } from './ContainerImpl.js';
import { inject } from './decorators/inject.js';
import { findMetadata, findOrCreateMetadata } from './findMetadata.js';

@@ -21,3 +20,3 @@ import { isSingleton } from './isSingleton.js';

ContainerImpl: typeof ContainerImpl;
inject: typeof inject;
inject: import("./decorators/inject.js").InjectDecorator;
findMetadata: typeof findMetadata;

@@ -24,0 +23,0 @@ findOrCreateMetadata: typeof findOrCreateMetadata;

{
"name": "cheap-di",
"description": "TypeScript dependency injection like Autofac in .Net",
"version": "4.0.0-rc-7",
"version": "4.0.0-rc-8",
"scripts": {

@@ -6,0 +6,0 @@ "compile": "tsc --build tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",

@@ -103,2 +103,14 @@ # cheap-di

To use stage 2 decorators you need to adjust your tsconfig.json like:
```json
{
"compilerOptions": {
// ...
"experimentalDecorators": true
}
}
```
To use stage 3 decorators you don't need extra setup.
## <a name="registration-variants"></a> Registration variants

@@ -105,0 +117,0 @@

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