summaryrefslogtreecommitdiff
path: root/src/node_modules/inversify/amd/syntax/binding_in_syntax.js
blob: eb25c8f10935223c77028d3eef0b756bf0ac77f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
define(["require", "exports", "../constants/literal_types", "./binding_when_on_syntax"], function (require, exports, literal_types_1, binding_when_on_syntax_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var BindingInSyntax = (function () {
        function BindingInSyntax(binding) {
            this._binding = binding;
        }
        BindingInSyntax.prototype.inRequestScope = function () {
            this._binding.scope = literal_types_1.BindingScopeEnum.Request;
            return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);
        };
        BindingInSyntax.prototype.inSingletonScope = function () {
            this._binding.scope = literal_types_1.BindingScopeEnum.Singleton;
            return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);
        };
        BindingInSyntax.prototype.inTransientScope = function () {
            this._binding.scope = literal_types_1.BindingScopeEnum.Transient;
            return new binding_when_on_syntax_1.BindingWhenOnSyntax(this._binding);
        };
        return BindingInSyntax;
    }());
    exports.BindingInSyntax = BindingInSyntax;
});