Fix linting and add new lint rules

This commit is contained in:
Dolan Miu
2022-09-19 20:48:50 +01:00
parent e90d97b813
commit 5950055cca
13 changed files with 78 additions and 46 deletions

View File

@ -1,4 +1,4 @@
// Simple example to add text to a document
// Exporting the document as a stream
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { Document, Packer, Paragraph, TextRun } from "../build";
@ -26,6 +26,5 @@ const doc = new Document({
],
});
Packer.toStream(doc).then((stream) => {
stream.pipe(fs.createWriteStream("My Document.docx"));
});
const stream = Packer.toStream(doc);
stream.pipe(fs.createWriteStream("My Document.docx"));