Using const rather than var and let, and using ts rather than js examples

This commit is contained in:
Dolan Miu
2019-08-06 17:51:13 +01:00
parent 0f1f398e6d
commit 820e5edc1e
13 changed files with 87 additions and 87 deletions

View File

@ -6,21 +6,21 @@
Creating Headers and footers is simple. Access the `Header` and `Footer` by doing so like this:
```js
```ts
doc.Header;
doc.Footer;
```
You can call the same methods as you would with a `File`:
```js
```ts
doc.Header.createParagraph("Header text");
doc.Footer.createParagraph("Footer text");
```
Even add images:
```js
```ts
doc.Header.createImage([BUFFER_OF_YOUR_IMAGE]);
doc.Footer.createImage([BUFFER_OF_YOUR_IMAGE]);
```
@ -33,7 +33,7 @@ Also all the supported section properties are implemented according to: http://o
### Example
```js
```ts
const header = this.document.createHeader();
const footer = this.document.createFooter();