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';