@awesome-fe/translate
Version:
Translation utils
23 lines (22 loc) • 1.11 kB
TypeScript
import { InlineableAttribute } from './utils/inlineable-attributes';
import { Asciidoctor } from '@asciidoctor/core';
import AbstractNode = Asciidoctor.AbstractNode;
import AttributeEntry = Asciidoctor.Document.AttributeEntry;
export interface NodeRenderer<T extends AbstractNode> {
render(node: T): string;
}
export declare abstract class BaseNodeRenderer<T extends AbstractNode> implements NodeRenderer<T> {
abstract render(node: T): string;
protected ignoredAttributeNames: readonly (string | RegExp)[];
protected globalIgnoredAttributeNames: readonly (string | RegExp)[];
protected positionalAttributes: readonly InlineableAttribute[];
protected inlineAttributeNames: (string | RegExp)[];
protected isInlineAttribute(it: AttributeEntry): boolean;
protected getAttributes(node: T): AttributeEntry[];
protected getDefaultAttributes(node: T): {
[name: string]: any;
};
protected getNonDefaultAttributes(node: T): AttributeEntry[];
protected getBlockAttributes(node: T): AttributeEntry[];
protected getInlineAttributes(node: T): AttributeEntry[];
}