UNPKG

vue-typedi

Version:

Use typedi injections in Vue components

18 lines 566 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var utils_1 = require("./utils"); function install(vue) { vue.mixin({ beforeCreate: function () { var _this = this; var injections = utils_1.getInjections(this.$options); if (injections) { injections.forEach(function (value, propertyName) { _this[propertyName] = value(); }); } } }); } exports.install = install; //# sourceMappingURL=install.js.map