UNPKG

@knodes/typedoc-pluginutils

Version:
25 lines 845 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SourceMapContainer = void 0; const lodash_1 = require("lodash"); const source_map_layer_1 = require("./source-map-layer"); class SourceMapContainer { constructor() { this._layers = []; } /** * Create a new layer added to this container. * * @param label - The layer's label. * @param originalText - The original text. * @returns the new layer. */ addLayer(label, originalText) { const parentLayer = (0, lodash_1.last)(this._layers); const newLayer = new source_map_layer_1.SourceMapLayer(label, originalText, parentLayer); this._layers.push(newLayer); return newLayer; } } exports.SourceMapContainer = SourceMapContainer; //# sourceMappingURL=source-map-container.js.map