Correctly exporting methods
This commit is contained in:
@ -1,8 +1,7 @@
|
||||
// Page numbers
|
||||
// Import from 'docx' rather than '../build' if you install from npm
|
||||
import * as fs from "fs";
|
||||
import { AlignmentType, Document, Header, Packer, PageBreak, Paragraph, TextRun } from "../build";
|
||||
import { PageNumber } from "../build/file/paragraph";
|
||||
import { AlignmentType, Document, Header, Packer, PageBreak, PageNumber, Paragraph, TextRun } from "../build";
|
||||
|
||||
const doc = new Document();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Footnotes
|
||||
// Import from 'docx' rather than '../build' if you install from npm
|
||||
import * as fs from "fs";
|
||||
import { Document, Packer, Paragraph, TextRun, FootnoteReferenceRun } from "../build";
|
||||
import { Document, FootnoteReferenceRun, Packer, Paragraph, TextRun } from "../build";
|
||||
|
||||
const doc = new Document();
|
||||
|
||||
@ -17,7 +17,9 @@ doc.addSection({
|
||||
}),
|
||||
],
|
||||
}),
|
||||
new Paragraph("Hello World").referenceFootnote(3),
|
||||
new Paragraph({
|
||||
children: [new TextRun("Hello World"), new FootnoteReferenceRun(3)],
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -13,7 +13,9 @@ const header = new Header({
|
||||
new TextRun({
|
||||
children: ["Page number: ", PageNumber.CURRENT],
|
||||
}),
|
||||
new TextRun(" to ").numberOfTotalPagesSection(),
|
||||
new TextRun({
|
||||
children: [" to ", PageNumber.TOTAL_PAGES_IN_SECTION],
|
||||
}),
|
||||
],
|
||||
alignment: AlignmentType.CENTER,
|
||||
}),
|
||||
|
Reference in New Issue
Block a user