reactive-di
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -42,6 +42,10 @@ 'use strict'; | ||
function component /*:: <V: Function>*/(localDeps /*: RegisterDepItem[]*/) /*: (target: V) => V*/ { | ||
function component /*:: <V: Function>*/() /*: (target: V) => V*/ { | ||
for (var _len = arguments.length, localDeps = Array(_len), _key = 0; _key < _len; _key++) { | ||
localDeps[_key] = arguments[_key]; | ||
} | ||
return function (target /*: V*/) { | ||
var meta = getMeta(target); | ||
if (localDeps) { | ||
if (localDeps.length) { | ||
meta.localDeps = localDeps; | ||
@@ -55,4 +59,4 @@ } | ||
function deps /*:: <V: Function>*/() /*: (target: V) => V*/ { | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
args[_key2] = arguments[_key2]; | ||
} | ||
@@ -94,4 +98,4 @@ | ||
function updaters /*:: <V: Function>*/() /*: (target: V) => V*/ { | ||
for (var _len2 = arguments.length, updaters = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
updaters[_key2] = arguments[_key2]; | ||
for (var _len3 = arguments.length, updaters = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
updaters[_key3] = arguments[_key3]; | ||
} | ||
@@ -98,0 +102,0 @@ |
{ | ||
"name": "reactive-di", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Reactive dependency injection", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -29,6 +29,6 @@ // @flow | ||
export function component<V: Function>(localDeps?: RegisterDepItem[]): (target: V) => V { | ||
export function component<V: Function>(...localDeps: RegisterDepItem[]): (target: V) => V { | ||
return (target: V) => { | ||
const meta = getMeta(target) | ||
if (localDeps) { | ||
if (localDeps.length) { | ||
meta.localDeps = localDeps | ||
@@ -35,0 +35,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
176068
3005