not compatible with jsPDF 2.0.0 - Property 'autoTable' does not exist on type 'jsPDF'
See original GitHub issueHello,
I tried to use jsPDF-AutoTable with jsPDF 2.0.0 but I cant find the way to solve the following compile error: Property ‘autoTable’ does not exist on type ‘jsPDF’
` import jsPDF from ‘jspdf’;
import ‘jspdf-autotable’; … const doc = new jsPDF(‘landscape’, ‘mm’, ‘a4’);
doc.autoTable({ body: [x.content], `
It worked with jsPDF 1.5.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Property 'autoTable' does not exist on type jsPDF
The following worked for me in Angular 11, jsPDF 2.3.1, jspdf-autotable 3.5.14: import jsPDF from 'jspdf' import autoTable from ...
Read more >Property 'autoTable' does not exist on type jsPDF #297 - GitHub
I am using angular2 and Node JS. I have installed jspdf and jspdf-autotable both modules using npm. and in .angular-cli.json file , I...
Read more >jspdf-autotable - npm
Start using jspdf-autotable in your project by running `npm i jspdf-autotable`. There are 228 other projects in the npm registry using ...
Read more >jspdf-autotable/README.md - UNPKG
The CDN for jspdf-autotable. ... The goal is to support all units supported by jspdf including mm and in but currently there is...
Read more >Property 'autoTable' does not exist on type jsPDF - Bountysource
I am using angular2 and Node JS. I have installed jspdf and jspdf-autotable both modules using npm. and in .angular-cli.json file , I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello I have an similar error, I import the scripts like this:
And want to use it like this:
I have all times the doc.autoTable is not a function error.
As an alternative, you could create an interface wrapping the autoTable plugin. This effectively does the same, its just (imo) prettier:
Also, this lets you add any other plugins as new lines in the interface (ofc you could just AND it together like @digit81 proposed).
Then use it in your class: