Skip to content

Commit 3b2e356

Browse files
abrahammieKrista Abraham
andauthored
🤖 Merge PR DefinitelyTyped#71784 [@types/pdfkit] Adds indentAllLines to TextOptions by @abrahammie
Co-authored-by: Krista Abraham <[email protected]>
1 parent 51aee15 commit 3b2e356

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎types/pdfkit/index.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ declare namespace PDFKit.Mixins {
413413
columnGap?: number | undefined;
414414
/** The amount in PDF points (72 per inch) to indent each paragraph of text */
415415
indent?: number | undefined;
416+
/** Whether to indent all lines of a paragraph */
417+
indentAllLines?: boolean | undefined;
416418
/** The amount of space between each paragraph of text */
417419
paragraphGap?: number | undefined;
418420
/** The amount of space between each line of text */

‎types/pdfkit/pdfkit-tests.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ doc.text("Text with null link", { align: "left" });
227227
doc.text("Text with null link", { align: "center" });
228228
doc.text("Text with null link", { align: "right" });
229229
doc.text("Text with null link", { align: "justify" });
230+
231+
doc.text("Text with all lines indented", { indentAllLines: true });
232+
230233
// @ts-expect-error
231234
doc.text("Text with null link", { align: "other" }); // Altought this is not an error in JS side, the inclusion of `string` did break type hints
232235

0 commit comments

Comments
 (0)