UNPKG

@manuth/woltlab-compiler

Version:

A compiler for generating WoltLab-Package `.tar` Archives and other WoltLab-Package Components

26 lines 858 B
import { XML } from "../Serialization/XML.js"; import { XMLEditor } from "../Serialization/XMLEditor.js"; import { ObjectDeletionFileCompiler } from "./ObjectDeletionFileCompiler.js"; /** * Provides the functionality to compile files with a named delete-section. * * @template T * The type of the item which can be compiled by this compiler. */ export class NamedObjectDeletionFileCompiler extends ObjectDeletionFileCompiler { /** * @inheritdoc * * @param object * The object to delete. * * @returns * The serialized deletion-entry. */ CreateDeleteObject(object) { let editor = new XMLEditor(XML.CreateDocument(this.ObjectTagName).documentElement); editor.SetAttribute("name", object.Name); return editor.Element; } } //# sourceMappingURL=NamedObjectDeletionFileCompiler.js.map