-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add TypeScript Support #38
base: main
Are you sure you want to change the base?
Conversation
Thanks! I'll take a look at it. One thing I saw, was that you defined all the printers, codepage mappings and codepages. The code pages are imported from CodepageEncoder so it may make sense to define it there. Also the printers and mappings are automatically generated during build time, so perhaps the definitions for these could be in separate files and also be generated. I'll be away for the next week or so, but after that I'll pick it up again. |
|
||
qrcode( | ||
value: string, | ||
options: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options is not mandatory. we can put a question mark there.
marginRight?: number; | ||
paddingLeft?: number; | ||
paddingRight?: number; | ||
align: "left" | "right"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from my experience, "center" works with box as well.
width?: number; | ||
marginLeft?: number; | ||
marginRight?: number; | ||
align?: "left" | "right"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from my experience, "center" works with table as well.
+1 |
This pull request introduces TypeScript support to the ReceiptPrinterEncoder.