Comparing version 0.3.0 to 0.4.0
@@ -1,2 +0,1 @@ | ||
import "reflect-metadata"; | ||
import { ParamHandler, PropertyHandler } from "./Handlers"; | ||
@@ -3,0 +2,0 @@ /** |
"use strict"; | ||
require("reflect-metadata"); | ||
/** | ||
@@ -158,3 +157,3 @@ * Service container. | ||
return params.map(function (param, index) { | ||
var paramHandler = _this.findParamHandler(type, index); | ||
var paramHandler = Container.findParamHandler(type, index); | ||
if (paramHandler) | ||
@@ -161,0 +160,0 @@ return paramHandler.getValue(); |
@@ -1,2 +0,1 @@ | ||
import "reflect-metadata"; | ||
/** | ||
@@ -3,0 +2,0 @@ * Marks class as a service that can be injected using container. |
"use strict"; | ||
require("reflect-metadata"); | ||
var Container_1 = require("./Container"); | ||
@@ -4,0 +3,0 @@ /** |
{ | ||
"name": "typedi", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Dependency injection for Typescript", | ||
@@ -27,3 +27,2 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"reflect-metadata": "^0.1.3" | ||
}, | ||
@@ -45,3 +44,5 @@ "devDependencies": { | ||
"typescript": "^1.8.7", | ||
"typings": "^0.7.7" | ||
"typings": "^0.7.7", | ||
"es6-shim": "^0.35.0", | ||
"reflect-metadata": "^0.1.3" | ||
}, | ||
@@ -48,0 +49,0 @@ "scripts": { |
@@ -16,8 +16,9 @@ # TypeDI | ||
3. ES6 features are used, so you may want to install [es6-shim](https://github.com/paulmillr/es6-shim) too: | ||
3. ES6 features are used, so you may want to install [es6-shim](https://github.com/paulmillr/es6-shim) too. You also | ||
need to install [reflect-metadata](https://www.npmjs.com/package/reflect-metadata) package. | ||
`npm install es6-shim --save` | ||
`npm install reflect-metadata --save` | ||
if you are building nodejs app, you may want to `require("es6-shim");` in your app. | ||
or if you are building web app, you man want to add `<script src="path-to-shim/es6-shim.js">` on your page. | ||
if you are building nodejs app, you may want to `require("es6-shim");` and `require("reflect-metadata")` in your app. | ||
@@ -29,3 +30,3 @@ ## Usage | ||
```javascript | ||
import {Container} from "typedi/typedi"; | ||
import {Container} from "typedi"; | ||
@@ -46,3 +47,3 @@ class SomeClass { | ||
```javascript | ||
import {Container, Inject} from "typedi/typedi"; | ||
import {Container, Inject} from "typedi"; | ||
@@ -90,3 +91,3 @@ class BeanFactory { | ||
```javascript | ||
import {Container, Service} from "typedi/typedi"; | ||
import {Container, Service} from "typedi"; | ||
@@ -142,3 +143,3 @@ class BeanFactory { | ||
```javascript | ||
import {Container, Service, Require} from "typedi/typedi"; | ||
import {Container, Service, Require} from "typedi"; | ||
@@ -168,3 +169,3 @@ @Service() | ||
```javascript | ||
import {Container, Service, Inject} from "typedi/typedi"; | ||
import {Container, Service, Inject} from "typedi"; | ||
@@ -171,0 +172,0 @@ interface Factory { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
0
236
27604
17
360
- Removedreflect-metadata@^0.1.3
- Removedreflect-metadata@0.1.14(transitive)