mini-ioc-vue
Advanced tools
Comparing version 0.2.1 to 0.2.2
import Container, { AnyClass } from 'mini-ioc'; | ||
import { InjectionKey } from 'vue'; | ||
import { InjectionKey as Vue2InjectionKey } from '@vue/composition-api'; | ||
export declare const APP_IOC_CONTAINER_INJECT_KEY = "__VueAppDIContainer__"; | ||
export declare const injectKey: InjectionKey<Container> | Vue2InjectionKey<Container>; | ||
@@ -5,0 +6,0 @@ export declare function provideContainer(container?: Container): { |
10
index.js
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.computedResolver = exports.injectContainer = exports.provideContainer = exports.injectKey = void 0; | ||
exports.computedResolver = exports.injectContainer = exports.provideContainer = exports.injectKey = exports.APP_IOC_CONTAINER_INJECT_KEY = void 0; | ||
const mini_ioc_1 = require("mini-ioc"); | ||
const APP_IOC_CONTAINER_INJECT_KEY = '__VueAppDIContainer__'; | ||
exports.injectKey = Symbol(APP_IOC_CONTAINER_INJECT_KEY); | ||
exports.APP_IOC_CONTAINER_INJECT_KEY = '__VueAppDIContainer__'; | ||
exports.injectKey = Symbol(exports.APP_IOC_CONTAINER_INJECT_KEY); | ||
function provideContainer(container = new mini_ioc_1.default()) { | ||
@@ -15,3 +15,3 @@ return { | ||
return { | ||
[APP_IOC_CONTAINER_INJECT_KEY]: exports.injectKey, | ||
[exports.APP_IOC_CONTAINER_INJECT_KEY]: exports.injectKey, | ||
}; | ||
@@ -23,3 +23,3 @@ } | ||
// eslint-disable-next-line no-invalid-this | ||
const container = this[APP_IOC_CONTAINER_INJECT_KEY]; | ||
const container = this[exports.APP_IOC_CONTAINER_INJECT_KEY]; | ||
if (!container) | ||
@@ -26,0 +26,0 @@ throw new Error('Vue DI container is not provided'); |
{ | ||
"name": "mini-ioc-vue", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Vue.js mini-ioc binding internal package", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
2329
40