Introduce some functional programming techniques

This commit is contained in:
Dolan
2018-11-02 02:51:57 +00:00
parent 9cfd835171
commit 7980f14efb
108 changed files with 749 additions and 659 deletions

View File

@ -1,16 +1,12 @@
// http://officeopenxml.com/WPbookmark.php
import { XmlComponent } from "file/xml-components";
import { TextRun } from "../run";
import { BookmarkEndAttributes, BookmarkStartAttributes } from "./bookmark-attributes";
export class Bookmark {
public linkId: number;
public readonly linkId: number;
public readonly start: BookmarkStart;
public readonly text: TextRun;
public readonly end: BookmarkEnd;
constructor(name: string, text: string, relationshipsCount: number) {
@ -23,7 +19,7 @@ export class Bookmark {
}
export class BookmarkStart extends XmlComponent {
public linkId: number;
public readonly linkId: number;
constructor(name: string, relationshipsCount: number) {
super("w:bookmarkStart");
@ -39,7 +35,7 @@ export class BookmarkStart extends XmlComponent {
}
export class BookmarkEnd extends XmlComponent {
public linkId: number;
public readonly linkId: number;
constructor(relationshipsCount: number) {
super("w:bookmarkEnd");