pdfmake-wrapper如何编写具有多种样式的行

pdfmake-wrapper how to write a line with multiple style

我正在尝试这个库,它是 pdfmake 的包装器,但我找不到如何使多个样式内联,例如这个例子:

我已经为此苦苦挣扎

所以我刚刚找到了问题的答案:

new Txt([
   new Txt('I\'ve been struggling').bold().end,
   ' on this for a',
   new Txt('while').italics().end
]).end