admin管理员组文章数量:1400124
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?
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?
Share Improve this question edited Sep 30, 2016 at 11:30 peterh 1 asked Dec 21, 2015 at 12:23 GayanGayan 2,8817 gold badges50 silver badges92 bronze badges 2- 1 Here is a quick migration guide : basarat.gitbooks.io/typescript/content/docs/types/… – basarat Commented Dec 21, 2015 at 22:38
- Possible duplicate of typescript: What to do if a typings (or tsd) is not available? – Alex Commented Sep 30, 2016 at 11:35
1 Answer
Reset to default 7You can put the following line before the function call:
declare var loadImage;
[Playground]
本文标签: javascriptTypescript declaration for global functionStack Overflow
版权声明:本文标题:javascript - Typescript declaration for global function - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744186765a2594325.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论