Work on moving Document into its own wrapper
This commit is contained in:
27
src/file/document-wrapper.ts
Normal file
27
src/file/document-wrapper.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { Document, IDocumentOptions } from "./document";
|
||||
import { Footer } from "./footer";
|
||||
import { Header } from "./header/header";
|
||||
import { Relationships } from "./relationships";
|
||||
|
||||
export interface IViewWrapper {
|
||||
readonly View: Document | Footer | Header;
|
||||
readonly Relationships: Relationships;
|
||||
}
|
||||
|
||||
export class DocumentWrapper implements IViewWrapper {
|
||||
private readonly document: Document;
|
||||
private readonly relationships: Relationships;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user