UNPKG

@manuth/woltlab-compiler

Version:

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

38 lines (37 loc) 1.22 kB
import { IDeleteInstruction } from "../PackageSystem/Instructions/IDeleteInstruction.js"; import { ImportFileCompiler } from "./ImportFileCompiler.js"; /** * Provides the functionality to compile files with an import- and a delete-section. * * @template TItem * The type of the item which can be compiled by this compiler. * * @template TObject * The type of the information that is required for serializing an object-deletion. */ export declare abstract class ObjectDeletionFileCompiler<TItem extends IDeleteInstruction<TObject>, TObject> extends ImportFileCompiler<TItem> { /** * Initializes a new instance of the {@link ObjectDeletionFileCompiler `ObjectDeletionFileCompiler<TItem, TObject>`} class. * * @param item * The item to compile. */ constructor(item: TItem); /** * Serializes the delete-section of the document. * * @returns * The serialized deletion. */ protected CreateDelete(): Element; /** * Serializes an object to delete. * * @param object * The object to delete. * * @returns * The serialized deletion-entry. */ protected abstract CreateDeleteObject(object: TObject): Element; }