issues
search
natancabral
/
pdfkit-table
Helps to draw informations in simple tables using pdfkit. #server-side. Generate pdf tables with javascript (PDFKIT plugin)
MIT License
93
stars
59
forks
source link
Updated and fixed the types
#78
Open
linusbrolin
opened
1 year ago
linusbrolin
commented
1 year ago
Fixed exports so the library works properly in typescript projects.
Fixed "Data" type, so it now properly has a typed "options" field, with the new added "RowOptions" interface, which was missing before.
Moved "separation" from where it was wrongly listed in "DataOptions" to "RowOptions" where it belongs.
Added missing "color" in "DataOptions" and made "fontSize" and "fontFamily" optional.
Changed the type of "row" in header.renderer from the wrong "number" type to the correct "Data" type.
Changed the type of "padding" in "Options" from the wrong "number[]" type to the correct "number | number[]" type.
Added "addBackground" function, because it needs to be reachable in typescript projects.
Added missing "callback" parameter in the "table" function.