docutils-ts
Version:
Port of the Python Docutils library to TypeScript
24 lines (23 loc) • 703 B
JavaScript
import TransformSpec from './transformSpec.js';
/**
* Base class for docutils components.
* Extends TransformSpec, which itself extends SettingsSpec. Thus all
* docutils components inherit numerous properties and "capabilities"
* from this inheritance chain. All should probably be combined into
* a single class since nothing is gained from having the inheritance
* hierarchy.
*/
class Component extends TransformSpec {
constructor() {
super(...arguments);
this.supported = [];
this.componentType = 'random';
}
toString() {
return `Component<${this.constructor.name}>`;
}
getTransforms() {
return [];
}
}
export default Component;