Skip to content

Instantly share code, notes, and snippets.

@nummi
Created December 2, 2017 19:40
Show Gist options
  • Save nummi/0c1fe05fcfc7a84ac9b6ba68390d43ea to your computer and use it in GitHub Desktop.
Save nummi/0c1fe05fcfc7a84ac9b6ba68390d43ea to your computer and use it in GitHub Desktop.
/// <reference path="../../../../node_modules/@types/jszip/index.d.ts" />
const JSZIP_URL = 'https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.5/jszip.min.js';
function loadJSZip() {
return new Promise((resolve, reject) => {
vsRequire([JSZIP_URL], (script) => {
resolve(script);
});
});
}
loadJSZip.then(function(JSZip) {
let zip = new JSZip();
// Cannot use 'new' with an expression whose type lacks a call or construct signature.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment