Skip to content

Commit f9ce87b

Browse files
🤖 dprint fmt
1 parent 7b66b88 commit f9ce87b

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

types/pdfkit/index.d.ts

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,21 @@ declare namespace PDFKit.Mixins {
344344

345345
type BoundingBox = [number, number, number, number];
346346

347-
type SizeUnits = 'em' | 'in' | 'px' | 'cm' | 'mm' | 'pc' | 'ex' | 'ch' | 'rem' | 'vw' | 'vmin' | 'vmax' | '%' | 'pt';
347+
type SizeUnits =
348+
| "em"
349+
| "in"
350+
| "px"
351+
| "cm"
352+
| "mm"
353+
| "pc"
354+
| "ex"
355+
| "ch"
356+
| "rem"
357+
| "vw"
358+
| "vmin"
359+
| "vmax"
360+
| "%"
361+
| "pt";
348362

349363
type Size = number | `${number}` | `${number}${SizeUnits}`;
350364

@@ -450,7 +464,11 @@ declare namespace PDFKit.Mixins {
450464
/** The maximum width the table can expand to (defaults to the remaining content width (offset from the tables position)) */
451465
maxWidth?: number;
452466
/** Column definitions of the table. (default auto) */
453-
columnStyles?: number | Array<number | string> | ColumnStyle | ((row: number) => number | ColumnStyle | undefined);
467+
columnStyles?:
468+
| number
469+
| Array<number | string>
470+
| ColumnStyle
471+
| ((row: number) => number | ColumnStyle | undefined);
454472
/** Row definitions of the table. (default *) */
455473
rowStyles?: number | Array<number | string> | RowStyle | ((row: number) => number | RowStyle | undefined);
456474
/** Defaults to apply to every cell */
@@ -479,9 +497,9 @@ declare namespace PDFKit.Mixins {
479497
/** How many columns this cell covers, follows the same logic as HTML colspan */
480498
colSpan?: number;
481499
/** Font options for the cell */
482-
font?: { src?: PDFFontSource; family?: string; size?: number; };
500+
font?: { src?: PDFFontSource; family?: string; size?: number };
483501
/** Sets the cell type (for accessibility) (default TD) */
484-
type?: 'TD' | 'TH';
502+
type?: "TD" | "TH";
485503
}
486504

487505
interface ColumnStyle extends CellStyle {
@@ -502,9 +520,9 @@ declare namespace PDFKit.Mixins {
502520
maxHeight?: string | number;
503521
}
504522

505-
interface RowStyle extends CellStyle, RowBase { }
523+
interface RowStyle extends CellStyle, RowBase {}
506524

507-
interface RowOptions extends CellOptions, RowBase { }
525+
interface RowOptions extends CellOptions, RowBase {}
508526

509527
interface PDFTableObject {
510528
/** Add a row of data (null and undefined are not rendered) */

types/pdfkit/pdfkit-tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ doc.table({
561561
});
562562

563563
doc.table({
564-
data: [['col 1', 'col 2', 'col 3']],
564+
data: [["col 1", "col 2", "col 3"]],
565565
rowStyles: { minHeight: 20 },
566-
columnStyles: { maxWidth: 50 }
566+
columnStyles: { maxWidth: 50 },
567567
});
568568

569569
doc.text("Scale", { align: "justify" });

0 commit comments

Comments
 (0)