npm install file-saver-typescript
HOW TO USE
import {FileSaver} from "./file-saver"
let fileSaver: any = new FileSaver();
fileSaver.responseData = {RESPONSE};
fileSaver.strFileName = {FILE NAME};
fileSaver.strMimeType = {FILE TYPE};
fileSaver.initSaveFile();