all files / document-editor/implementation/search/ text-search-result.js

100% Statements 21/21
100% Branches 0/0
100% Functions 9/9
100% Lines 21/21
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46   15× 15× 15× 15×     136×     34×           65×     34×                   19× 19×        
define(["require", "exports"], function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var TextSearchResult = (function () {
        function TextSearchResult(owner) {
            this.startIn = undefined;
            this.endIn = undefined;
            this.owner = owner;
            this.documentHelper = this.owner.documentHelper;
        }
        Object.defineProperty(TextSearchResult.prototype, "start", {
            get: function () {
                return this.startIn;
            },
            set: function (value) {
                this.startIn = value;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(TextSearchResult.prototype, "end", {
            get: function () {
                return this.endIn;
            },
            set: function (value) {
                this.endIn = value;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(TextSearchResult.prototype, "text", {
            get: function () {
                return this.documentHelper.selection.getTextInternal(this.start, this.end, false);
            },
            enumerable: true,
            configurable: true
        });
        TextSearchResult.prototype.destroy = function () {
            this.start = undefined;
            this.end = undefined;
        };
        return TextSearchResult;
    }());
    exports.TextSearchResult = TextSearchResult;
});