Files
docx-js/src/export/formatter.ts

15 lines
432 B
TypeScript
Raw Normal View History

import { IViewWrapper } from "file/document-wrapper";
2018-02-02 01:56:08 +00:00
import { BaseXmlComponent, IXmlableObject } from "file/xml-components";
2016-03-28 00:53:24 +01:00
export class Formatter {
public format(input: BaseXmlComponent, file?: IViewWrapper): IXmlableObject {
2019-12-18 21:11:15 +00:00
const output = input.prepForXml(file);
if (output) {
return output;
} else {
throw Error("XMLComponent did not format correctly");
}
2016-03-28 00:53:24 +01:00
}
}