I'm using dynamic imports with Angular 7 to reduce the size of the initial vendor bundle.
import('xlsx').then(XLSX => {
const wb: XLSX.WorkBook = XLSX.read(bstr, { type: 'binary' });
})
But there is an error on the XLSX.WorkBook type saying:
Cannot find namespace XLSX.
XLSX.read works fine.
Question : How do I define types when using dynamic imports?