docutils-ts
Version:
Port of the Python Docutils library to TypeScript
27 lines (26 loc) • 818 B
JavaScript
import TransformSpec from '../transformSpec.js';
class Output extends TransformSpec {
constructor(args) {
super({ logger: args.logger });
this.componentType = 'output';
this.supported = [];
if (args.encoding !== undefined) {
this.encoding = args.encoding;
}
this.errorHandler = args.errorHandler || 'strict';
this.destination = args.destination;
this.destinationPath = args.destinationPath;
if (!args.destinationPath) {
this.destinationPath = this.defaultDestinationPath;
}
}
encode(data) {
return data; // fixme?
}
toString() {
return `Output<${this.constructor.name}>`;
}
}
//Output.componentType = 'Output';
//Output.defaultDestinationPath = null;
export default Output;