UNPKG

@manuth/woltlab-compiler

Version:

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

40 lines (39 loc) 1.05 kB
import { Compiler } from "./Compiler.js"; /** * Provides the functionality to compile components to `.xml`-files. * * @template T * The type of the item which can be compiled by this compiler. */ export declare abstract class XMLFileCompiler<T> extends Compiler<T> { /** * Initializes a new instance of the {@link XMLFileCompiler `XMLFileCompiler<T>`} class. * * @param item * The item to compile. */ constructor(item: T); /** * Gets the tag-name of the document-element of the `xml`-document. */ protected abstract get TagName(): string; /** * @inheritdoc */ protected Compile(): Promise<void>; /** * Gets the compiled `xml`-document of the component. */ protected get Document(): Document; /** * Gets the content of the `xml`-element as a string. */ protected get Content(): string; /** * Creates the document to compile. * * @returns * The serialized document. */ protected CreateDocument(): Document; }