title: error TS2540: Cannot assign to 'vfs' because it is a read-only property
body: <p><strong>Im Trying to generate PDF using pdfmaker. In my code it dosent show any errors.but when compiling it show below error. but also pdf is working and generating.</strong></p>
  <p>error TS2540: Cannot assign to 'vfs' because it is a read-only property.</p>
  <pre><code>&gt;   19 pdfMake.vfs = pdfFonts.pdfMake.vfs;
  &gt;                ~~~
  &gt;     src/app/component/invoice/invoice.component.ts:235:25 - error TS2345: Argument of type '{ content: ({ text: string; fontSize:
  &gt; number; alignment: string; color: string; bold?: undefined;
  &gt; decoration?: undefined; style?: undefined; columns?: undefined; } | {
  &gt; text: string; fontSize: number; bold: boolean; ... 4 more ...;
  &gt; columns?: undefined; } | { ...; } | { ...; })[]; styles: { ...; }; }'
  &gt; is not assignable to parameter of type 'TDocumentDefinitions'.
  &gt;       Types of property 'content' are incompatible.
  &gt;         Type '({ text: string; fontSize: number; alignment: string; color: string; bold?: undefined; decoration?: undefined; style?:
  &gt; undefined; columns?: undefined; } | { text: string; fontSize: number;
  &gt; bold: boolean; ... 4 more ...; columns?: undefined; } | { ...; } | {
  &gt; ...; })[]' is not assignable to type 'Content'. 
  &gt;           Type '({ text: string; fontSize: number; alignment: string; color: string; bold?: undefined; decoration?: undefined; style?:
  &gt; undefined; columns?: undefined; } | { text: string; fontSize: number;
  &gt; bold: boolean; ... 4 more ...; columns?: undefined; } | { ...; } | {
  &gt; ...; })[]' is not assignable to type 'ArrayOfContent'.
  &gt;             The types returned by 'pop()' are incompatible between these types.
  &gt;               Type '{ text: string; fontSize: number; alignment: string; color: string; bold?: undefined; decoration?: undefined;
  &gt; style?: undefined; columns?: undefined; } | { text: string; fontSize:
  &gt; number; bold: boolean; ... 4 more ...; columns?: undefined; } | { ...;
  &gt; } | { ...; } | undefined' is not assignable to type 'string |
  &gt; ArrayOfContent | ContentText | ContentColumns | ContentStack |
  &gt; ContentUnorderedList | ... 11 more ... | undefined'.
  &gt;                 Type '{ text: string; fontSize: number; alignment: string; color: string; bold?: undefined; decoration?: undefined;
  &gt; style?: undefined; columns?: undefined; }' is not assignable to type
  &gt; 'string | ArrayOfContent | ContentText | ContentColumns | ContentStack
  &gt; | ContentUnorderedList | ... 11 more ... | undefined'.
  &gt;                   Property 'tocItem' is missing in type '{ text: string; fontSize: number; alignment: string; color: string; bold?:
  &gt; undefined; decoration?: undefined; style?: undefined; columns?:
  &gt; undefined; }' but required in type 'ContentTocItem'.
  &gt;     
  &gt;     235       pdfMake.createPdf(docDefinition).download();
  &gt;                                 ~~~~~~~~~~~~~
  &gt;     
  &gt;       node_modules/@types/pdfmake/interfaces.d.ts:253:5
  &gt;         253     tocItem: boolean | string | string[];
  &gt;                 ~~~~~~~
  &gt;         'tocItem' is declared here.
  &gt;     src/app/component/invoice/invoice.component.ts:237:25 - error TS2345: Argument of type '{ content: ({ text: string; fontSize:
  &gt; number; alignment: string; color: string; bold?: undefined;
  &gt; decoration?: undefined; style?: undefined; columns?: undefined; } | {
  &gt; text: string; fontSize: number; bold: boolean; ... 4 more ...;
  &gt; columns?: undefined; } | { ...; } | { ...; })[]; styles: { ...; }; }'
  &gt; is not assignable to parameter of type 'TDocumentDefinitions'.
  &gt;     
  &gt;     237       pdfMake.createPdf(docDefinition).print();
  &gt;                                 ~~~~~~~~~~~~~
  &gt;     src/app/component/invoice/invoice.component.ts:239:25 - error TS2345: Argument of type '{ content: ({ text: string; fontSize:
  &gt; number; alignment: string; color: string; bold?: undefined;
  &gt; decoration?: undefined; style?: undefined; columns?: undefined; } | {
  &gt; text: string; fontSize: number; bold: boolean; ... 4 more ...;
  &gt; columns?: undefined; } | { ...; } | { ...; })[]; styles: { ...; }; }'
  &gt; is not assignable to parameter of type 'TDocumentDefinitions'.
  &gt;     
  &gt;     239       pdfMake.createPdf(docDefinition).open();
  </code></pre>
  <p><strong>This is my component.ts code and im using generatePDf function to generate pdf and its working fine and no error showing.</strong></p>
  <pre><code>import * as pdfMake from 'pdfmake/build/pdfmake.js';
  import * as pdfFonts from 'pdfmake/build/vfs_fonts.js';
  pdfMake.vfs = pdfFonts.pdfMake.vfs;
  
  
   generatePDF(action = &quot;open&quot;) {
      let docDefinition = {
        content: [
          {
            text: &quot;Indika Agro Sales and Service Center&quot;,
            fontSize: 16,
            alignment: &quot;center&quot;,
            color: &quot;#047886&quot;,
          },
          {
            text: &quot;INVOICE&quot;,
            fontSize: 20,
            bold: true,
            alignment: &quot;center&quot;,
            decoration: &quot;underline&quot;,
            color: &quot;skyblue&quot;,
          },
          {
            text: &quot;Customer Details&quot;,
            style: &quot;sectionHeader&quot;,
          },
          {
            columns: [
                [
                    {
                        text: this.invoiceform.value.customerName,
                        bold: true
                    },
                    { text:this.invoiceform.value.cusPhnNumber,  }
                ],
                [
                    {
                        text: `Date: ${new Date().toLocaleString()}`,
                        alignment: 'right'
                    },
                    {
                        text: `Bill No : ${((Math.random() * 1000).toFixed(0))}`,
                        alignment: 'right'
                    }
                ]
            ]
        },
        ],
        styles: {
          sectionHeader: {
            bold: true,
            decoration: &quot;underline&quot;,
            fontSize: 14,
            margin: [0, 15, 0, 15],
          },
        },
      };
  
      if (action === &quot;download&quot;) {
        pdfMake.createPdf(docDefinition).download();
      } else if (action === &quot;print&quot;) {
        pdfMake.createPdf(docDefinition).print();
      } else {
        pdfMake.createPdf(docDefinition).open();
      }
    }
  </code></pre>