@bmat/translation-management
Version:
Manage Front-End translations from multiple sources
27 lines (26 loc) • 729 B
TypeScript
export declare type VDOMNode = string | VDOM<any>;
export interface VDOM<T> {
tagName: string;
attributes: T;
children: null | VDOMNode[];
}
export interface XMLSerializable {
toXML: (doc?: Document) => Element;
}
export interface VDOMSerializable<T> {
tagName: string;
toVDOM: (doc?: Document) => VDOM<T>;
}
/**
* Base entity
*/
export declare class XLMBaseEntity<T = {
[key: string]: string;
}> implements XMLSerializable, VDOMSerializable<T> {
private _attributes;
private _children;
readonly tagName: string;
constructor(_attributes: T, _children?: (string | (XMLSerializable & VDOMSerializable<any>))[] | undefined);
toXML(doc?: Document): Element;
toVDOM(): VDOM<T>;
}