UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

35 lines (34 loc) 971 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var TextSpan_1 = require("./TextSpan"); /** * Represents a text change. */ var TextChange = /** @class */ (function () { /** @internal */ function TextChange(compilerObject) { this._compilerObject = compilerObject; } Object.defineProperty(TextChange.prototype, "compilerObject", { /** Gets the compiler text change. */ get: function () { return this._compilerObject; }, enumerable: true, configurable: true }); /** * Gets the text span. */ TextChange.prototype.getSpan = function () { return this._span || (this._span = new TextSpan_1.TextSpan(this.compilerObject.span)); }; /** * Gets the new text. */ TextChange.prototype.getNewText = function () { return this.compilerObject.newText; }; return TextChange; }()); exports.TextChange = TextChange;