问题
I am trying to use image loading third party plugin blueimp. That plugin has global function
loadImage(
e.target.files[0],
function (img) {
document.body.appendChild(img);
},
{ maxWidth: 600 }
);
How can I call this function using typescript?
回答1:
You can put the following line before the function call:
declare var loadImage;
[Playground]
来源:https://stackoverflow.com/questions/34395615/typescript-declaration-for-global-function