julianhille / MuhammaraJS

Muhammara a node module with c/cpp bindings to modify PDF with js for node or electron (based/replacement on/of galkhana/hummusjs)
Other
205 stars 41 forks source link

Typescript errors, inconsistencies #369

Open ktwbc opened 6 months ago

ktwbc commented 6 months ago
Screenshot 2024-01-08 at 10 03 08 AM

Typescript is flagging some of the examples copied straight out of docs. For example, createPage appears to not accept the text string, flagging it as only wanting width and height in numbers.

Second issue is even the text string is inconsistent, readme example says letter-size but your jsdocs say it should be letter not letter-size:

_Create a new page, specifying either actual width and height, or the name of a supported page size (eg. 'letter', ) @name createPage @function @memberof Recipe @param {number|string} [pageWidth_or_pageSizeName='letter'] - The page width, or name of medium size. Known named medium sizes: executive, folio, legal, letter, ledger, tabloid, a0-a10, b0-b10, c0-c10, ra0-ra4, sra0-ara4 @param {number} [pageHeight_orrotation] - The page height, or rotation (90) when when page size name given. @param {object} [margins] - page margin definitions.