@manuth/woltlab-compiler
Version:
A compiler for generating WoltLab-Package `.tar` Archives and other WoltLab-Package Components
73 lines (72 loc) • 2.13 kB
TypeScript
import { INode } from "../../NodeSystem/Generic/INode.js";
import { ICategory } from "../../Options/Generic/ICategory.js";
import { Option } from "../../Options/Option.js";
import { IOptionInstruction } from "../../PackageSystem/Instructions/Options/IOptionInstruction.js";
import { ImportFileCompiler } from "../ImportFileCompiler.js";
/**
* Provides the functionality to compile option-files.
*
* @template TInstruction
* The type of the instruction which can be compiled by this compiler.
*
* @template TCategory
* The type of the option-categories.
*
* @template TOption
* The type of the options.
*/
export declare abstract class OptionFileCompiler<TInstruction extends IOptionInstruction<TCategory, TOption>, TCategory extends ICategory<TOption>, TOption extends Option> extends ImportFileCompiler<TInstruction> {
/**
* The language-category which contains translations for options.
*/
private languageCategory;
/**
* Initializes a new instance of the {@link OptionFileCompiler `OptionFileCompiler<TInstruction, TCategory, TOption>`} class.
*
* @param instruction
* The instruction to compile.
*/
constructor(instruction: TInstruction);
/**
* Gets or sets the language-category which contains translations for options.
*/
get LanguageCategory(): string;
/**
* @inheritdoc
*/
set LanguageCategory(value: string);
/**
* @inheritdoc
*
* @returns
* The serialized import.
*/
protected CreateImport(): Element;
/**
* @inheritdoc
*
* @returns
* The serialized deletion.
*/
protected CreateDelete(): Element;
/**
* Serializes a category to xml.
*
* @param category
* The category to serialize.
*
* @returns
* The serialized category.
*/
protected CreateCategory(category: INode<TCategory>): Element;
/**
* Serializes an option to xml.
*
* @param option
* The option to serialize.
*
* @returns
* The serialized option.
*/
protected CreateOption(option: TOption): Element;
}