Files
docx-js/src/file/document-wrapper.ts

30 lines
897 B
TypeScript
Raw Normal View History

import { Document, IDocumentOptions } from "./document";
2021-03-25 15:01:11 +11:00
import { Footer } from "./footer/footer";
2021-03-01 23:35:52 +00:00
import { FootNotes } from "./footnotes";
import { Header } from "./header/header";
import { Relationships } from "./relationships";
import { XmlComponent } from "./xml-components";
export type IViewWrapper = {
readonly View: Document | Footer | Header | FootNotes | XmlComponent;
readonly Relationships: Relationships;
};
export class DocumentWrapper implements IViewWrapper {
private readonly document: Document;
private readonly relationships: Relationships;
2022-08-31 07:52:27 +01:00
public constructor(options: IDocumentOptions) {
this.document = new Document(options);
this.relationships = new Relationships();
}
public get View(): Document {
return this.document;
}
public get Relationships(): Relationships {
return this.relationships;
}
}