@stoplight/ioc
Advanced tools
Comparing version 0.0.43 to 0.0.44-alpha.0
@@ -1,6 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
require("reflect-metadata"); | ||
tslib_1.__exportStar(require("./ioc"), exports); | ||
import 'reflect-metadata'; | ||
export * from './ioc'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,11 +0,9 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// @ts-ignore | ||
var inversify_1 = require("inversify"); | ||
var inversify_binding_decorators_1 = require("inversify-binding-decorators"); | ||
var inversify_inject_decorators_1 = require("inversify-inject-decorators"); | ||
exports.container = new inversify_1.Container(); | ||
var provideDecorator = inversify_binding_decorators_1.makeFluentProvideDecorator(exports.container); | ||
import { Container } from 'inversify'; | ||
import { makeFluentProvideDecorator } from 'inversify-binding-decorators'; | ||
import getDecorators from 'inversify-inject-decorators'; | ||
export const container = new Container(); | ||
const provideDecorator = makeFluentProvideDecorator(container); | ||
// @provideSingleton decorator | ||
exports.provideSingleton = function (identifier) { | ||
export const provideSingleton = (identifier) => { | ||
return provideDecorator(identifier) | ||
@@ -16,10 +14,8 @@ .inSingletonScope() | ||
// @provide decorator | ||
exports.provide = function (identifier) { | ||
export const provide = (identifier) => { | ||
return provideDecorator(identifier).done(); | ||
}; | ||
// @inject decorator | ||
exports.lazyInject = inversify_inject_decorators_1.default(exports.container).lazyInject; | ||
var inversify_2 = require("inversify"); | ||
exports.inject = inversify_2.inject; | ||
exports.injectable = inversify_2.injectable; | ||
export const lazyInject = getDecorators(container).lazyInject; | ||
export { inject, injectable } from 'inversify'; | ||
//# sourceMappingURL=ioc.js.map |
{ | ||
"name": "@stoplight/ioc", | ||
"version": "0.0.43", | ||
"version": "0.0.44-alpha.0", | ||
"description": "Stoplight ioc implementation.", | ||
"main": "lib/index.js", | ||
"module": "lib/index.es.js", | ||
"jsnext:main": "lib/index.es.js", | ||
"sideEffects": false, | ||
"author": "Stoplight <dev@stoplight.io>", | ||
@@ -29,3 +28,3 @@ "homepage": "https://stoplight.io", | ||
}, | ||
"gitHead": "863127087b0dcfaebf40e7c0ed86bedcd2835468" | ||
"gitHead": "ba495e3f8984dd68df510ccfbc2d8401515c4161" | ||
} |
Sorry, the diff of this file is not supported yet
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
3183
29