-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat #1: demo code added #8
Conversation
Verified all files but not the demo file it's way long to read. Can you refresh https://sc231997.github.io/PdfMakeNet/ so I can go ahead a see it there running? I saw few changes I miss that are in the playground but not on the main docs. |
The demo is updated now. new { text = "someString", otherProperty = "value" } I guess if we look at the |
For this kind of case that you mentioned, we should create a new class called like PdfMakeOrderedListItem & PdfMakeUnorderedListItem, both should inherit from PdfkMakeText and apply their own interface. What you think? |
Actually I thought of doing so but that won't work. We have to inherit every class. As instead of text there can be any other pdfmake element |
Any workaround using type params maybe? |
Never mind, this approach won't work cause it will create a nested object and won't work. |
Can you enum what kind of types a Another dirty option is doing explicit list items types, example:
Then you can place list item specific properties like You can create a interface like What you think about this one? |
This looks interesting, but don't we have to implement this for almost all the classes? |
I don't think we have to implement it for every class, this is why I said if you can enum where does this apply. As I understand we can have list item of type of:
What else? |
Actually it can be anything from pdfmake: export interface ContentUnorderedList extends ContentBase {
ul: UnorderedListElement[];
type?: UnorderedListType;
markerColor?: string;
} export type UnorderedListType = 'square' | 'circle' | 'none';
export type UnorderedListElement = Content & {
listType?: UnorderedListType;
}; export type Content =
| string
| ArrayOfContent
| ContentText
| ContentColumns
| ContentStack
| ContentUnorderedList
| ContentOrderedList
| ContentTable
| ContentAnchor
| ContentPageReference
| ContentTextReference
| ContentToc
| ContentTocItem
| ContentImage
| ContentSvg
| ContentQr
| ContentCanvas; interfaces.d.ts.txt Please look at the file here. I have taken this from |
I read it, it can be anything. I will merge in this change until I think a way around this. We would still need the |
A dirty way could be having all those attributes under |
hmm sounds good, very good, PdfMakeStyle it's almost on every PdfMake type. Add your inputs and ideas here #9 |
This PR contains demo code for: