How to import saveAs() from file-saver in Typescript (Angular)
First, install the library for your angular or other typescript project:
npm i --save file-saver
npm i --save-dev @types/file-saver
Now you can import it using
import { saveAs } from 'file-saver';
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow