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

di-ts

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

di-ts - npm Package Compare versions

Comparing version 0.0.18 to 0.0.26

6

Gruntfile.js

@@ -12,7 +12,7 @@

commitFiles: ['-a'],
createTag: true,
createTag: false,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'upstream',
pushTo: 'origin',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',

@@ -26,2 +26,4 @@ globalReplace: false,

grunt.loadNpmTasks('grunt-bump');
};
{
"name": "di-ts",
"version": "0.0.18",
"version": "0.0.26",
"description": "Lightweight wrap and extension of angular/di.js for TypeScript.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -30,8 +30,12 @@

```typescript
import {Provide} from 'di-ts'
export class Engine {
}
```
### mockEngine.ts
```typescript
import {Provide} from 'di-ts'
import {Engine} from './engine'
@Provide(Engine)

@@ -49,5 +53,4 @@ export class MockEngine {

import {Car} from './car'
import {Engine, MockEngine} from './engine'
import {Engine} from './engine'
var injector = new Injector();

@@ -57,2 +60,3 @@ var car: Car = injector.get(Car); //instantiate car, car.engine is magically instance of Engine! :)

import {MockEngine} from './mockEngine'
var injector2 = new Injector([MockEngine]);

@@ -59,0 +63,0 @@ var car2: Car = injector2.get(Car); //instantiate car, car.engine is instance of MockEngine! :)

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