How can i use jsPDF in my ionic project?

  1. I have installed jsPDF using npm command

I googled and followed this topic:

Now in my component.ts file when i write -

let jsPDF = require('jspdf');

It says > [ts] cannot find name require.

Please advise , how to get rid of the error ?


Look at this solution =>
You need to import @types for jsPDF